fix remote authentication when username/password have special characters

CBLChangeTracker and CBLRemoteRequest read credentials out of a URL
object, which will return them in url-encoded form. They have to be
url-decoded before use, or authentication with the remote doesn't work.

(fixes couchbase/couchbase-lite-android#26)
use newer, thread-safe BasicCookieStore

In production logs, we would frequently get
ConcurrentModificationException in CBLHttpClientFactory.addCookies.
Tracing the code for a potential concurrent modification was fruitless.

Updating to a more recent verion of Apache's BasicCookieStore that is
newer than what Android provides and has been rewritten with better
concurrency support stopped the issue from occurring.

(fixes couchbase/couchbase-lite-android-core#4)
Fix for issue #109.  Same change as pull request #13 but done slightly differently.
Merge pull request #14 from mjq/fix_escaped_pw

fix remote authentication when username/password have special characters
Merge pull request #15 from mjq/cookiestore

use newer, thread-safe BasicCookieStore
Refactor to allow running outside of Android.
Refactor to allow running outside of Android.
using byte[] instead of ByteArrayBuffer gives 6x speed boost
Fix unit tests
Add a test case to detect base64 decode compatibility issue
Pull over the Android impl of Base64 and revert to using it.
Pull over the Android impl of Base64 and revert to using it.
No need to run that test in an async task
Test uses cblite.util.Base64 now
Merge branch 'refs/heads/portable_java'

Conflicts:
	src/instrumentTest/java/com/couchbase/cblite/testapp/tests/Replicator.java
	src/main/java/com/couchbase/cblite/replicator/changetracker/CBLChangeTracker.java
	src/main/java/com/couchbase/cblite/support/CBLRemoteMultipartDownloaderRequest.java
	src/main/java/com/couchbase/cblite/support/CBLRemoteRequest.java