Added Within function.

Within is useful for finding the bin of a datapoint, for example when making a histogram or otherwise trying to find similar points. This commit adds the function and tests.