Make client deal with expired token transparently.

- Use OwnerPassword resource instead of implicit to match how it is done is cf
- Check if the token is about to expire and use refresh token if so.
- Remove unneeded unit tests