Fixes unhandled exceptions in Transaction

This fixes issue #468 handling 2 errors:
 * Uncaught exception "Invalid public key" in ``Transaction.getSendingAddresses()``, thrown inside ``Address.fromScriptSig()``
 * Correctly handles ``undefined`` in ``Transaction.getReceivingAddresses()``, returned from ``Address.fromScriptPubKey()``. This was causing ``TypeError: Cannot call method 'toString' of undefined`` as reported on #468

I didn't know how to create test transactions to write tests for it, if you could give some directions, I'd be happy to write tests for it.