Refactor: Use javascript objects

Enables more flexible clients. E.g.

var chain = new Chain({
  keyId: '[redacted]',
  keySecret: '[redacted]',
  blockChain: 'testnet3'
});