Abstract common client bits into a rest/client module

- move client.chain() and client.skip() into the client module
- added client.wrap() as the preferred way to apply interceptors to clients
- deprecated client.chain(); although it still works it will log a warning
- updated docs and examples to use wrap