Add support for upstart-app-launch to request application resume & focus. This revealed extra work: prevent unexpected focus events propagating to shell, fix lifecycle bug and add workaround for handling of non-application sessions (like QtWebProcess and maliit). Fixes: https://bugs.launchpad.net/bugs/1228345.
Approved by Michał Sawicz, Ricardo Mendoza, PS Jenkins bot.