Speed up reading types

Use H5Oget_info to get type address instead of getting type name (which
apparently requires a search through all objects in the file). Also use
global buffers in some places instead of allocating on every call.