Improve serialization performance

Couple of improvements to the serialization strategy:
- emit the fact that the map is read-only, so we preserve that trait
- write out the size and entries ourselves, not via an intermediate
  HashMap()

The read path now takes these changes into account and resets the
rootupdater after deserialization is done back to null.

Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
Make hash/equality function final

Removes duplicate fields and makes the equivalent methods final. Also
marks things that we take care of as transient, thus allowing us to
reuse the JVM magic in serialization.

Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
Rework the read-only handling

Instead of using the updater reference as the indicator of read-only
views, add an explicit boolean. Thus all instances reuse a single
updater reference, but still guard access to it via an explicit check.

This changes the behavior a bit: instead of throwing NPE on read-only
views, we throw IllegalStateException. The reason for that is that we
should have caught the attempt in the MAP API functions.

Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
Detect attempts to modify read-only view

Adds explicit checks for read-only snapshot before attempting to perform
a modification operation. As per ConcurrentMap/Iterator interface
specification, throw an UnsupportedOperationException if such an attempt
is made.

Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
Merge pull request #13 from rovarga/check-readwrite

Detect attempts to modify read-only view
Merge pull request #14 from rovarga/serialization-v2

Further improvements to serialization
Merge pull request #15 from rovarga/outstanding

Rework read-only tracking
Memory and performance optimization. Don't create empty instance every time, reuse the same one instead. It is an immutable data structure after all ;-)
Release 0.2.1
Prepare next development iteration.
Update README.md
[maven-release-plugin] prepare release java-concurrent-hash-trie-map-0.2.2
[maven-release-plugin] rollback the release of java-concurrent-hash-trie-map-0.2.2
[maven-release-plugin] prepare release java-concurrent-hash-trie-map-0.2.23
[maven-release-plugin] prepare for next development iteration
Update the maven version in README.md