WIP: Add StateWatch

A test run is in a particular state.  This state includes what test is
currently executing, what line is currently executing, etc.  This state
needs to be communicated live to the UI and should be useful during test
replay when investigating what has gone wrong.

The data structure is like:

    {
        "test_run": {
            "current_line": {
                "file": "tests/my_file.py",
                "line": 123,
            },
            "test": {
                "name": "tests/my_file.py::test_that_this_rocks",
                "file": "tests/my_file.py",
                "function": "test_that_this_rocks,
                "line": 87
            }
        }
    }

Conceptually the data-structure lives in the test-pack.  It is ephermal
and only exists while the test job is executing.  Changes to this data
structure are serialised and sent over a socket to the UI so the current
state of the system can be displayed.  The serialisation includes
timestamps such that the state of the system can be inspected and
replayed as part of the test result.

The change serialisation format is \\r\\n seperated JSON dictionaries.
Here's an example entry pretty printed for clarity's sake (in reality it
would be on a single line):

    {
        "state_change": {
            "time": {"$date": "2014-11-28T20:55:26.092343Z"},
            "changes": {
                "test_job.current_line": {
                    "file": "tests/my_file.py",
                    "line": 654
                }
            }
        }
    }

This record indicates that the current line changed to line 654 of file
"tests/my_file.py" at 20:55:26.0992343 UTC on 2014-11-28.  Notes:

* The root object has a single key "state_change".  This allows extensions
  in the future for other types of messages to be sent over the same
  protocol.

* The state_change message has two keys:

    * "time" which is the time of the change using mongodb style date
      format `{"$date": "2014-11-28T20:55:26.092343Z"}`.  The date
      timestamp is in ISO8601 format.  The fact that this is an object
      rather than just a string may seem a little odd but JSON has no
      native datetime type so this is necessary to specify the type.

    * "changes" is a dictionary of changes made to the state of the
      system.  The keys identify the value that is changing, and the
      values are the new value of the respective key.  The key is dot
      seperated strings identifying the subtree of the heirarical data
      structure that should be replaced.  e.g:

          "test_run.current_line": {"cow": "moo"}

      means:

          date["test_run"]["current_line"] = {"cow": "moo"}

      The fact that multiple values may be replaced in one message allows
      atomic changes to happen to the hierarchy.

TODO:
* Come up with a better name
stbt-run: make `filename` private