Fix output from decode_connections

Strip off "|$app_uuid|$gear_uuid" from the end of all types of
connections (including TOHTTPS etc), not just from connections without
modifiers.
Bug 1067031 - Do not include old versions of carts in latest carts just because they have a unique software version
Merge pull request #4804 from danmcp/dev/bug1067031

Merged by openshift-bot
Merge pull request #4798 from ncdc/master

Merged by openshift-bot
Multiple fixes
 - Adding option to prevent rollback in case of successful execution of a destructive operation that is not reversible (deleting gear on the node)
 - Checking for the existence of the application after obtaining the lock