refactored doRequest method
created base for http client
allow usage of custom clients
added base client options ; added possibility to change response format
added possibility to change api version for next request
added getApiBaseUrl method for http client
implemented ClientInterface
save last request and last response
replaced curl client with the new one in Api.php (+BC)
updated http methods from Api.php to use the client (+BC)
Api.php: removed unused code, updated methods to use the new http client, removed process response method (+BC)
updated ClientInterface
make tests pass again
added tests for new http client
added setClient method inside Api.php which allow to set a custom Http\ClientInterface client
added ListenerInterface
implemented ListenerInterface ; TODO: add tests
Updated Api::setCredentials to use the new BasicAuthListener (+BC)
updated ClientInterface: added addListener method
updated tests for http client