Refactored initialization of http client to HttpClientFactory. Added onThrowable callback. Removed usage of java.util.Optional
Refactored the API for async client, removed classes we do not want to support.