Add a test for issue #1058.

This is the first 'real' test using the python/http interface to
the IDE, and, while I believe that the framework is reliable, is
unfortunately remarkably dependant on the conditions that make this
issue show itself. In particular, those are that the file-lock timeout
is short, and that the backend is given three requests in very quick
succession, which then clash.

That said, with the default lock timeout (200ms) in place, this test
repeatably fails while using my ide clone on optimus as the test subject.
Testing against localhost, however, seems less able to prove failures.
Add a project http test.
Add tearDowns that remove the projects created.

It turns out that the proj/del endpoint is already implemented and
works. It's just not exposed anywhere yet, which is probably a good
thing given how final it is.
Move some construct work into an init method.

This is needed because the openProject method causes locks to be
openned and then closed against the requested repo, even if the
request isn't a proj/xxx command!
Also use initModule in the file module.

This allows us to remove the somewhat dodgy exception hiding around
getting the project manager instance, and make the team and project
input values more explicitly required.
Prevent the module init method being called more than once.

This is the current behaviour that constructor things expect, so we
need to respect this. It was also breaking a number of tests.
Ensure that the parent constructor is called.

Previously, auto-auth didn't call the parent's .ctor, leading to
some issues if the keyfile didn't yet exist.
Fix #1058 by having the file log use the master repo.

In addition to the recent changes that ensure that the project module's
constructor doesn't open repos, this ensures that the file log command
won't clash with either of the file/compat-tree or file/lint calls
that will be going on at the same time (just after a commit).
Optimise file linting.

Delay the initial repsitory interaction until after the pre-checks
and avoid other actions on the user's repo. Since we may be editing
it (possibly checking out files), this might as well occur on the
copied repo, rather than the original so as to minimise our locking
requirements. It also means that we don't need to worry about undo-ing
the checkout.
Merge branch 'master' into optimus-master
Merge branch 'optimise-locks' into optimus-master
Remove an invalid comment & variable.
Make a variable local.
Fix #468: Enable fixed-revision syntax checking.

Previously, the file/lint endpoint had no mechanism to have a syntax
check requested for an old revision. This commit adds this, and has
both the project syntax check and the project export buttons make
use of this. Also add a test.
Replace EditArea with ACE, mostly using Rob's changes.

This builds on changes prototyped by Rob, but introduces a submodule
rather than committing the ace source directly. I feel this is
preferable, as it allows us to easily switch between both flavours
(minimised or not for instance) of ACE as well as versions.

TODOs:
 * Modified marker on the edit tab, verify auto-save
 * Selection persistence (and thus linking to errors)
 * Styling - fit to page
 * Undo support - beyond tab switch
Remove redundant code.

The pre_loaded stuff isn't relevant any more with ACE.
Focus on the editor when switching tabs to the edit tab.
Restore selection setting functionality.

Including double-clicking on errors to select the line.
Add comment.
Use an ACE EditSession for each tab.

This is much better than rolling our own text swapping situation,
as it doesn't involve re-writing the text in the editor each time
you change tabs. Instead, we allocate the text into a session, and
then switch sessions. This has the advantage that we can update the
text whenever we get more data, rather than needing to wait until
the editor is shown.

This also fixes the issues around undos, since each session gets its
own UndoManager.