Mock modules properly in test runner

As an added bonus, the jasmine web interface now groups tests by file.

Test Plan:
grunt test passes on b2507066, the parent of 566f8b2e (which committed a workaround for buggy module mocking).

@benjamn