Modified Mousetrap definition to allow Mousetrap to be loaded as an
external module.

- tests are also updated to test loading as an external module
- mousetrap exports itself as an AMD module when an AMD define function is
  present