Handle quoted properties better. Fixes issue 1173
R=dimvar
Rewrite how commonjs exports are handled. Fixes lots of bugs and make them easier to type-check.  Fixes issue 1189