adds basic auth support and refactored MainHttpClient class.

fixes ushahidi#17

This handled adding user-agent and basic auth headers to all requests.
Allows easily adding query params or headers via `addParam`. and
`addHeader`.

Planning to reuse this class a bit more in some related callback
features. Also was planning to refactor MessageSyncHttpClient and use
the new methods to simplify a bit and show how to use the API.

I replaced the poorly named `getText` function with a `getResponse` and
`convertStreamToString` static method.

Also added `$` to URL_PATTERN in case you have that in your basic auth
password.