Location: separate valid locations to class ValidLocation

This moves Location.Valid (and related functionality) to ValidLocation. I hope this makes the design a bit clearer.

Meanwhile, fix the reflexivity issues of equals() by providing the entire implementation in Location.