typetools: type referense: equals, hashCode, toString and erasure helper

Signed-off-by: Ketoth Xupack <ketoth.xupack@gmail.com>