Correct deprecated setting of __proto__

Setting the prototype of an object after it exists by setting \__proto\__ is deprecated in javascript because it is slow. I changed all instances of this in bitcore, and wrote some tests to make sure things were working correctly.

I did some performance tests to see if this made a difference. The mocha browser tests now run roughly 30% faster with this PR.

Firefox, before this PR:

* 14.64s
* 14.93s
* 14.65s

Firefox, with this PR:

* 11.40s
* 11.46s
* 11.22s

When running the tests in Firefox, we still get a warning about this, because chai, one of our dependencies, modifies \__proto\__. Nothing we can do about that at present. However, that dependency is only used in tests, so it doesn't affect the performance of bitcore in the real world.

Closes https://github.com/bitpay/bitcore/issues/427