Fixes to equality and hashcode

- `==` operator should not raise a TypeError when passed a non-decimal
- hashCode was not implemented