Resolve the types in structures from id to name

These stream ids for types refer to the current dictionary layer, so
that is now passed in when reading and used by the functions that
require it.

More reader functions may require the current library to be passed
through, but the current set passes all tests with the common, meta and
light dictionaries. If other dictionaries require it then we shall find
out later.