Override equals, hashCode and toString of tuples.

Also make constructors package private. This makes them value-based classes.