Tidied ContinuousVector.compareTo()
Initialising Double[] arrays

Small bug noticed by Kieran: arrays changed from double[] to Double[]
(see pull request #37) were being initialised with null's rather than
zero's as before. A new command, ExtraMath.newDoubleArray(), is useful
for initialising Double[] arrays correctly, and this is now called in
those instances that were changed in pull request #37