Replace all usages of HashCode/EqualsBuilder with custom code

That way, any hashCode() and equals() calls should run significantly
faster.