Matching

This is based off the requirejs branch so it includes those changes too. Most of the server bits here are by Ian (see commits), I just made a few bug fixes.

For the clienty bits I've used lodash and knockout to make things less painful. Lodash is huge and we probably won't use the majority of stuff it provides, so I added a new resources manager command that creates a (much smaller) custom build.

The version of knockout here is 3.2 which should be released any day now AFAIK, and I'm using it for the cool "components" feature it has, which lets you use custom HTML elements (like `<matching-form></matching-form>`) and load templates for them asynchronously using requirejs (here it's used for the matching dialog template). The templates are loaded using the requirejs text plugin. The r.js optimizer also has a flag where you can inline the template source into the javascript (which I've turned on).
Hmm, this was always a problem I had with knockout stuff in TT templates, so I did this impulsively. `&&` and `&amp;&amp;` both work correctly here though (I think HTML5 knows to ignore unencoded ampersands not followed by a known character entity). Since `&&` works I'll use that instead.