Add Mousetrap.record() method to capture and return keyboard sequences

This is essentially pull request #111 rolled up into one commit.