This improves on commit e13aa5c015,
which worked only for recent versions of longtable.
For older versions, we need to define a dummy counter `none`.
Closes#11201. Thanks to @priiduonu for the solution.
The table foot is made part of the table body, as otherwise it won't
show up in the output. The root cause for this is that longtable cannot
detect page breaks in Beamer.
Fixes: #8638