shell: Emit StartApplicationEvent at the right point

Emit StartApplicationEvent before a new application is activated, so that
listeners (currently mostly plugins) can modify the UI before it's
constructed and displayed.

Change-Id: I8ac87cd8c2781a7a8bbfff79a0d88b01a7c0b532