Fix a few resource leaks. Improve the API and add an integration test. Also add compability layer for XEP-0363: HTTP File Upload 0.2. SMACK-747
Fixes SMACK-747