LazyObjects: add getType() method

This breaks backwards compatibility, so bumps the development snapshot
version to 3.0.0.

The rationale is to make it possible for the ObjectIndex to better
discriminate which objects should be resolved for a particular call to
ObjectIndex#get(Class). The current behavior is to resolve _all_ pending
objects with _any_ call to get(Class), which is generally suboptimal.
ObjectIndex: only resolve relevant pending objects

If a pending object will not be of a type compatible with the
requested type, then skip resolution of that pending object.

This improves performance of the get(Class) and getAll() methods in
cases where there are a large number of pending objects in the index.

It also helps to eliminate difficulties like those in issue #90.
ObjectIndexTest: add a lazy object resolution test

This tests that the addLater method works in conjunction with calls to
get(Class). The logic is nontrivial because we only want to resolve
pending objects when the types are compatible with the requested one.