Fix equals/hashCode problem, pointed out by Kenji Yoshida.

This commit fixes a two issues:

  1. Some types implemented equals but not hashCode
  2. Number types equals could throw MatchErrors

At this point the implementations should be consistent.

(Fixes #15)