proper error handling in javascript api, fixed #485

In ethereum.js errors were not handled properly.
This caused the [first watch message being rejected with an error](https://github.com/ethereum/cpp-ethereum/issues/485) reported by @gavofyork 
and ["undefined" resolves as an error](https://github.com/ethereum/ethereum.js/issues/2) reported by @obscuren 

i will make also corresponding pull request to ethereum.js