Implement requirejs in core app.

It can do actual searches again, but scoring/sorting results and google
analytics is broken big time.