api/msgpack-rpc: Parse type information from api/private/defs.h

Enhance msgpack-gen.lua to extract custom api type codes from the ObjectType
enum in api/private/defs.h. The type information is made available from the api
metadata and clients can use to correctly serialize/deserialize these types
using msgpack EXT type.
api/msgpack-rpc: Use EXT type to serialize Buffer/Window/Tabpage
api/msgpack-rpc: Remove Position type, using arrays instead.
api/msgpack-rpc: Refactor msgpack_rpc_helpers.{c,h}

- Move helpers that are specific to API types to api/private/helpers.{c,h}
- Include headers with generated declarations
- Delete unused macros