Introduced mocha with some early tests for device component.
Fixes #149
Tweaked error handling.
Added option to disable nagle algorithm
Make notification.setAlertText() chainable
Production flag to switch environments, happens automatically when NODE_ENV=production.
Fixes #161

Merge branch 'jacereda-master'
Tests for #50
Fixes #159
Fixed doc for #50
Improved Safari Notification support.
Fixes #151 Improves credential loading

Improved credentials loading with better use of promises and more flexibility with parameters.

`keyData`, `certData` and `pfxData` still work as previously.

`key`, `cert` and `pfx` now support passing either a String or Buffer, if the string isn't valid PEM data then it will be loaded as a path, otherwise the passed parameter will be used as the "data" directly.

In addition `ca` accepts an array of parameters which will be treated as above. If `ca` is not an array it will be wrapped in an array and treated accordingly.
Tidying up

Removed extra raiseError/emit as this will happen when it falls through to the fail in `createConnection`
Fixes for #151
Fixes #152

Implement an exponential back-off delay when connect fails.
emit acknowledged event in the case that we know the message was sent without errors
adding ackTimeout behavior to new conn instantiator