Implement Screen Switching and “Do It.”

Implement Screen Switching and “Do It.” Change the way the Companion
and the Blocks Editor communicates to facilitate the Companion
returning values and giving commands. The Companion now returns a JSON
structure which includes return values and commands such as “switch
screen.”

Screen switching doesn’t (yet) support providing a value or returning
a value. It just switches screens. When invoked from the Companion,
the companion commands the blocks editor to switch screens. This
switches Screens in the blocks editor which in turn switches screens
in the Companion.

The results of “Do it” are inserted into a comment decorator on the
appropriate block if the block is an expression. If it is a statement,
the statement is executed and no return value is displayed. Note: If
you use “Do it” on a definition block, it just re-sends the
definition.

Note: “Do it” requires a connection to a companion. An appropriate
error dialog is supplied if it is used without the Companion
connected.

The Blocks Editor now compares the Companion version to a list
maintained internally. It can either change its behavior to work with
an old version or it can reject a version. In the case of a reject, a
modal dialog box is displayed in the blocks editor explaining that a
new version is required. Branding Commits can change this message to
point to an appropriate place to download the new version. In the case
where an old version may be used, a non-modal dialog is displayed when
the companion is connected explaining that new version should be
obtained soon.

Update the “internal use only” Phone Status block to add two new
functions. One function “doFault” causes an error to be thrown on the
UI Thread. Useful for debugging error handling. The other function
“getVersion” retrieves the applications “versionName” from the Android
manifest. It is used by the Companion code to display the companion
version on the greeting screen.

Change-Id: Id5d5b32e09281de86814799cb87ad37b272c654b