Made all hashable classes hash.

This closes GitHub #356.