AMD -> ES6

This pull request converts all the AMD modules in src/ to ES6 modules. The heavy lifting was done by [recast](https://github.com/benjamn/recast) but it turned to require a fair bit of manual cleaning up as well - so given that it will cause merge conflicts with any other work that's done concurrently, we should probably merge this in soon if we're going to merge it in at all, otherwise a lot of that work will have to be repeated.

### Why ES6 modules?

* much more compact syntax - no boilerplate, one less level of indentations
* paves the way for us to use ES6 features like arrow functions
* makes us look futuristic

### Downsides?

Only one that I can see - in order to do tests (or use the sandbox folder) locally without building, there's an intermediate transpilation step required. It turns out that this is very quick, and can be triggered with `grunt watch`, so I don't think it's a dealbreaker. (We could always move away from grunt and towards something more sophisticated like broccoli, which is quicker still.)

So what does everyone think - :+1: or :-1:?