[fix] added apache http client

jersey fails to send PATCH requests with Java HttpUrlConnection, so
apache http client is introduced.
[task] deprecated retrieveAccessToken(HttpResponse)
[fix] using more specialized exceptions in catch clause
[fix] HTTP status 401 requires WWW-Authenticate header