general: Add missing includes and remove deprecated type
Credit for missing includes to @treamology in Git commit
16cfac482923bc734447d234fd8eaaa99483847d
CGTableCount removed; modern macOS seems to call this
a uint32_t instead. I can find no reference to CGTableCount
in any documentation, and the (very old) source code I dig
up just typedefs it anyway.