Add unit test for Location.

This adds a randomized unit test for Location, covering general behaviour as well as the corner case fixed in the recent Location rewrite.
This is indeed something we'll have to tighten up later. The whole point of the location rewrite was 'all code and documentation assumes [0.0, 1.0], but Location does not handle the corner cases correctly'. While we will have to rewrite the other code some time, this tests the _documented_ behaviour.