Reduce duplication in Capability and RestClient.

I ran the library through [CodeClimate](https://codeclimate.com/github/twilio/twilio-node) to see if I could practise some node.js.

I don't know if this is a good idea or the way it might normally be done in node, so I thought I'd put it up for review. Is this a good way to share code between two class constructors?