demos: Implement inline console for programmatic debugging

Since these instances are a bit hard to access from the console,
add a "Toggle console" icon next to each widget demo which
will activate console mode.

In this mode, you can use a global variable "$widget" (named like
other console globals like $0, $1, $_, $$, etc.) to poke at that
widget from the console.

Also implement a basic simulation for when you're debugging in
a browser without a console handy or can't use it to reproduce
the bug (such as IE without dev tools or mobile).

Change-Id: I1f92c8f24a23a9be71ed21d17bf9f6ba69a7c575
Merge "demos: Implement inline console for programmatic debugging"