shell: Switch to cockpit.format() for string formatting

Also: Allow cockpit.format() to accept variable argument lists