Various Bug Fixes

Included are various bug fixes including:

* Fix byte[]'s being uploaded twice.
* More explicit use of StringBuilder.
* Explicit GZIP compression (for pre-Gingerbread devices).
* Other fixes and optimisations.