FORGE-995 Modified the equals and hashcode generator.

This is an API breaking change due to the introduction of a new parameter in the method.

The new implementation does away with the hardcoded field. It also generates equals and hashcode methods that are closer to the typically generated ones in IDEs.