Reimplement os_command; Add string support.

Follow pyte conventions, add os_command detection and its own argument
parser to streams.py.
Reimplement iframe mode API (design influenced by the graphterm API).

Use private modes to insert iframes and close the remote document and
switch to responding to requests. Implement request responses and strings
by using ECMA-48 'strings' which are interpreted as RFC822 messages,
optionally using json for header encoding (just like graphterm).

Prepare to use cookies for entering the iframe mode. Without a valid
cookie, executing javascript in the iframe will be disabled via an
appropriate sandbox attribute.