hashCode and equals for Locator

This allows us to use Locators as hash keys and in sets.