Make Locator hashable

implements `hashCode` and `equals` so that it can be used in hash tables and guava collections.