Adding tests for equals and hash code.
Adding implementation of equals and hashCode in Tlv.

The implementations are based on Joshua Bloch's Effective Java 2e.

Also added a trivial equality test: an object must be equal to itself.