[josm_routing] Fix a bunch of problems and NPEs (fix #josm5132 and #josm8257)

git-svn-id: http://svn.openstreetmap.org/applications/editors/josm/plugins@29586 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4