Prepare IndexItem to read JSON instead of serialized objects

When reading from a JSONInputStream, by necessity the fields' types are
not known before-hand, as e.g. a Class is serialized as its name (i.e.
as a String), and only when using the value in the proxy, it is apparent
what type it is actually expected to have.

So we'll have to work slightly harder when annotation indexes are
deserialized from JSON.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Use JSONInputStream to deserialize annotations

With this change, we can read annotations indexes written out both with
the Java serialization technique as well as with the upcoming JSON
technique.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Serialize annotations as JSON

This helps SezPoz to be independent of the vagaries of the particular
class path library it is running with: Android's TreeMap, for example,
is incompatible to deserialize TreeMap instances serialized with
Oracle's Java class library.

The IndexerTestBase had to be adjusted to reflect that the JSON-backed
serialization has to encode annotation and enum types explictly now (in
other words: the toString() output changed).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
IndexItem: optimize code path for JSON-based serialization

Now that we're (de-)serializing from/to our extended version of JSON, we
actually do not expect to see the SezPoz-speciic types anymore, except
for legacy artifacts. So let's try to handle other cases more urgently
than those.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>