Implemented cache (with equality tests failing)

Equality test relied on instances not being cached
Fixed test relying on non cache

https://github.com/kfgodel/diamond/issues/175
Merge pull request #185 from kfgodel/175-instance_cache

175 instance cache