Make the request resonse cycle stateless

Assumptions about deferred objects were creeping into the code that could have lead to state changes. This makes the code look a little wonky, but it fixes those state problems.

Specifically there was an assumption that each endpoint only needed one Q.deferred object. Simply not true. An endpoint needs a Q.deferred object for every request made to the server. This is accomplished by wrapping Q.deferred creation into a closure which scopes the deferred into the callbacks of the promise. This keeps the MethodFactory objects stateless between requests, as the state is stored in a closure that called every time a new request is sent.

----

~~Stil to do: decouple the getDeferred function, and put it into its own module. This could be useful for other modules.~~

Done.