Applied  daniel-j-h:cleanup pull request #71 as a patch.
Merged master pull request #72 from  daniel-j-h:postgis-compat, applying patchs by hand.
Patched master pull request #76 from  daniel-j-h:driving-distance-delta in this branch.
Merged master pull request #67 from  bjornharrtell:memfixclean in this branch.