Move functions related with UTFgrid to separate module
Refine helper functions

Helpers _bordering_tiles and _get_zoom_by_distance do not use Geocaching
instance, so define them as static methods.  Move functions around a bit and
format unit tests for better readability.