KDTree enhancements

This addresses issue #161, #201 and #88.

Remaining to be done:

- [x] check what happens on machines without pthread 
- [x] what is happening to cause the Travis build to tail, is this related to pthread?
- [x] velocity dispersion unit test (based on velocity dispersion calculated with old KDTree) is failing and needs fixing
- [x] should be able to calculate mean and dispersion of 1D as well as 3D arrays
- [x] should be able to use either float or double arrays
- [x] clean up explanation of use of threads, e.g. in config files
- [x] make sure sensible behaviour when position / mass / rho array are changed between uses of the tree
- [x] check for and fix issue #88