Much of this transformation has been done automatically:
* add expect import to each file
* replace `not.to` with `toNot`
* replace `to[Not]Be{Undefined,Null}` with equivalents
* replace `jasmine.createSpy(...)` with `except.createSpy`, and `andCallFake`
with `andCall`
Also:
* replace `jasmine.createSpyObj` with manual alternatives
* replace `jasmine.Clock` with `lolex`
9e89e71e broke uploadContent, making it set 'json=true' on the request, so that
we would try to turn raw content into JSON. It also misguidedly set a
client-side timeout of 30s.
Fix that, and add some tests to check uploadContent works.
In mock-request: distinguish between an expectation (ExpectedRequest)
and an actual request (Request). Add support for checking the headers, and the
request options in general, to Request.
Add a 3s delay between scrollback requests if the previous scrollback request
failed.
Return the same promise if scrollback() is called multiple times whilst a
scrollback request is ongoing.