Make Locator hashable

...by implementing `hashCode` and `equals`.
null check in Locator.equals
Merge pull request #147 from gdusbabek/hashable_locators

Make Locator hashable