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.

(cherry picked from commit 4d6c7ffabdb33dd0de03f051d632ecdd2a55cdae)