Dynamically combine our css and js files.

Potential performance improvement.

Change-Id: I7a8e14bfb21547842f7ec7e4cf4b222dc531754f
Also combine the login page's JS.

Change-Id: I705f692f8cdb3c953a28196149bd576017d391e2
Add tests for the up_to_date function & fixes.

Test the various cases that might occur, and switch to using the
files' mtime, rather than ctime, as this is the more useful value.

Change-Id: Iaba1c4264e616c8b8128dbf5d6c3a5ad54dbf9ec
Make and ignore the web cache folder.

This is the folder that stores the combined CSS & JS files.

Change-Id: I5e97fc78b7de70e4765d587b62d0ca4fffbb009a
Avoid a direct use of the logger.

For the moment, we wrap this so the tests have a different output
mechanism. Ideally, this probably should occur some other way.

Change-Id: I4c3f8a757edcf905a1ba7f6edec10518fe9f99f9
Tidy archiveSourceZip & its comment.

It doesn't need a working copy to run (as it always uses committed data),
fix the comment so that it aligns with the method.

Change-Id: I7e4ccda211948f18f61fd128643ebc1fde566908
Simplify getFile by removing stash handling.

Instead use the git built-in mechanism of getting the content of a
file at a given revision. This reduces the calls to git to a single
one, as well as vastly simplifying the logic required.

Change-Id: I095a8a27ff6539c8649e2c9b79175238c93a08dc
Fix code styling.

Change-Id: Ie270f9a545f224a0e5a4290a1ad48079536e5fc2
Remove redundant working out of project name.

We already it now, and from the more reliable cannonical
repoName function too.

Change-Id: Ia7ce0044f83ddb06193e2424201e1a26b21fba06
Don't always open projects in the proj module.

It turns out that most of the endpoints don't actually need
to use a working copy for their actions, and so don't need an
updated version of it available. Remove the openning of the
project from the module init, and add it into the endpoints
that actually need it.

In the process, move from a module level reference to local
references to the object, which makes it clearer when it's
getting created.

I'm hoping that this will reduce the number of errors that are
caused by lock failures, and initial testing suggests that it does.

Change-Id: Ia43387db721f7678f500194450d75e7660c812ca
Remove the robolog & simulator.

Neither of these has been developed for the last many years,
and aren't about to get the major attention they need. If they
do reappear, they'll need almost completely re-writing anyway.

Change-Id: Ie135ff2a619e7e73b33fe1148a0495093dcb5030
Use the right request counter.

Switch to at least using the right multi-request counter.
While this is a highly hacky mechanism for not showing the
wrong message, it should at least use the right variable.

Change-Id: Id1ea02c549abe3edd9df3d9bb71c03a6a3cc2d64
Remove the old style backend request mechanism.

Change-Id: Icb888c5129852a969f0384579ec28e42552ae240
Replace usage of $ with getElement.

$ means different things in different frameworks, so it's clearer
to use the alternative method with the more explicit name. This
also tidies things up so we can more easily move to a different
framework if we want.

Note that many uses have simply been removed as Mochikit allows id
strings anywhere it allows a response from getElement.

Change-Id: I6731e4f49c9287cefbe812ed4e1936dd51cc1a6a
Remove an unused function.

This was used previously on the login page, but that's
now a completely separate page, and handles submission-
on-enter by being a proper <form> isntead.

Change-Id: Iae57c563c2182cae3f0ef53d9ceaa6bdd4f44f3c
Merge changes Ia43387db,Ia7ce0044,Ie270f9a5,I095a8a27,I7e4ccda2,I4c3f8a75

* changes:
  Don't always open projects in the proj module.
  Remove redundant working out of project name.
  Fix code styling.
  Simplify getFile by removing stash handling.
  Tidy archiveSourceZip & its comment.
  Avoid a direct use of the logger.
Merge changes Iae57c563,I6731e4f4,Icb888c51,Id1ea02c5,Ie135ff2a

* changes:
  Remove an unused function.
  Replace usage of $ with getElement.
  Remove the old style backend request mechanism.
  Use the right request counter.
  Remove the robolog & simulator.
Add visual error markers via ace.

This adds error markers in Ace's line-number gutter via its
annotations interface. These are per-line for the moment as
this is both a limitation on the annotations, and of the data
we have available.

These are cleared when we set the value of the ace contents,
meaning that while the clear_errors function is present, it's
not actually needed. Since these are per 'session', each file
gets its own listing of errors (yay).

Change-Id: Ie2edd2f8a8115c9e9e29f8615dcfa64b149df39a
Fix #1004: Detect & refuse empty usernames.

LDAP binds with empty usernames will always fail,
so detect & refuse authentication attempts without a
username without even trying LDAP.

Change-Id: Icab67145a9d6db6f15317414fa24fcc7c8b07021
Also remove empty folders on proj/cron.

This ensures that we tidy things up when they're not needed,
in particular all the per-revision folders that contained the
zip files.

Change-Id: Ie65187eef9e760e83e00623ecceb81836c6362df