Added custom context menu to Spark + do UI switching using it

Replaced the not-so-pretty links directly in the app's UI with a context menu item.

Note: there seems to be a race condition somewhere: when repeatedly switching between the UIs, eventually the UI alternate windows erratically stop opening/closing. Also, 'this.window' in the code becomes sometimes null. This function is dev-only, though, and the first time switching always work,  so don't spend too much effort now figuring it out.