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).
So I guess this isn't in there -- it should be possible to *unmatch* too, which is what the 'empty' parameter to the match endpoint is about -- basically, if that's given and the list of matches is empty, it should supersede all old matches without entering a new one (making there be no current match).

Not sure how much complication it adds to make that possible. Can probably be ignored for now if it's too obnoxious.