Refactoring internal API to use modern Java APIs

`Hashtable` is too old and its prefered to use `HashMap`. Has no reason to use `Hashtable` here. And GsonDeserializer can use `Charset` instead of `String` charset name, that is preferable in Java 6+.

Plus: some minor changes that violates JLS like transient values stored into serializable objects, possible InputStream leaks, comparators without serialization, and more.