Fix for NPE when doing distance search on empty database

I wrote a failing test and a fix for this issue which is reported here:

https://github.com/neo4j/spatial/issues/64

Despite being closed, I stumbled upon this bug.