Export to kml

Refactor #641 to keep kmlexport in its own plugin