Add support for exporting ES6 classes.

@caridy @domenic

This should allow the module transpiler to work properly when classes are exported. I believe the three cases @caridy added are tested in this PR.

Closes #176.