Deep clone geometry coordinates

Our geometries are mutable, so they can be modified without
creating garbage by changing coordinates in place and calling
setGeometry afterwards. But this also means that we need to
create a deep clone of the coordinates.
Merge pull request #1267 from ahocevar/geom-clone

Deep clone geometry coordinates