Add support for overriding the default Pebble.sendAppMessage
Add coverage reporting to the Karma script.
Fix tests and tidied up the library.