Send basic authenticate credentials preemptively

- Use AuthCache to send credentials preemptively
- Check if password and username are null or empty before attempting to send credentials
Merge pull request #29 from cloudant/32398_auth_initial_request

Enable preemptive authentication to reduce network requests