Javadoc
Resolves a type by its partial name within a given package context, following PB (== C++)
conventions. If the given name is a builtin type name for a primitive type in the PB
language, a reference for that type will be returned.
This uses a stricter algorithm than resolveType, in that it fails to resolve if a partial
match fails, whereas resolveType keeps looking.
For example, if there exist types:
a.b.a.b.M.N
a.b.J
and we try to resolve the type "b.J" in the package "a.b.a.b", then resolveType will
successfully resolve "b.J" to "a.b.J".
In contrast, the proto compiler and resolveType2 will first perform the partial patch of "b" in
the package "a.b.a.b", which resolves to "a.b.a.b". The lookup "a.b.a.b.J" then fails.
TODO (jgeiger): can resolveType be replaced safely by resolveType2?