Rewrite of the Location class.

This fixes bugs:
* Location.equals(0.0, 1.0) returned false
* Location.distance(invalidLoc, invalidLoc, true) did not return 0.0

Further changes:
* Reuse change() (e.g. simpleDistance() is just abs(change()))
* Reuse isValid() instead of explicit bounds checks
* Simplify change()
* Simplify normalize()
* Use LOCATION_INVALID (= -1.0) instead of magic numbers
* Add just a bit more documentation