add tests, error handling, and smaller deps

I've refactored `ssh-key-to-pem` out of http-signature,
(see https://github.com/joyent/node-http-signature/issues/18)

Also, added error checking and some basic tests.

It would be a good idea to have some sort of testing that we are getting good quality randomness.
There are probably not any problems with openssl, but it is possible to do something stupid
that breaks it, and hard to detect that. for example: http://www.pcworld.com/article/2043700/secure-messaging-project-cryptocat-apologizes-over-bug.html

I have heard there are algorithms for this, but that is another module.