Bug 701159 - Wrong name in transform tool dialogs...

...when acting on a path or selection

Factor out the code that checks if an active item exists and if it's
transformable (not locked etc.) and use that function in more places.
This fixes both the wrong dialog labels and the tool running into
broken states when the selection or a path are being transformed.

(cherry picked from commit b13c68fda6dcedd43d7e2f4633191f9ddc6cdf3f)