Client API refactor

What this does is to put all the connection logic between client/server handled through a single place (/lib/api), instead of having it dispersed and implemented in each of the drivers and transports/endpoints. This way, future changes to endpoints or paths will be much simpler to manage. This simplifies a lot the code for the different drivers, and it greatly helps when it comes to error handling. 

Specs were updated so we're still passing 100% -- although we still need to cover some very important things, such as switching drivers or handling different configuration scenarios (updating with older client, etc).