Fixed start drag distance check when editing polygons

The start drag distance check was done in map pixels rather than screen
pixels, causing the minimum effective drag distance to be way too large
when zoomed in.
Fixed start drag distance when moving objects

See also commit 0fa36a9da5840976622c8d118dd25ed6084e84fb.
Fixed typo
Fixed leaking of QActions by the CommandButton

The actions created when opening the popup menu had the button as their
owner, causing them to never be cleaned up.
Fixed leaking of terrain types

The Tileset should own its terrain types. I just hope there wasn't some
obscure reason why the terrain types were not being deleted.