Introduce Tesla.Client with pre/post middleware
This change is backward compatible:
- Tesla.build_client API stays the same
- one can still use simple function as a client
Tesla.Client struct can hold any custom fun (as before)
but can now hold pre and post middleware lists.
pre works the same way as one given to build_client.
post middleware is injected right before adapter.
It can be used as a regular middleware but can be also
used to dynamically override adapter in runtime.
This is mostly useful in testing