Merge pull request #472 from modilabs/cleanup

Cleanup
solves issue with retrieval of Openrosa max upload size header, fixes issue with file uploads inside repeated fields (same name), closes #474
fixes issue where failed file retrieval blocks uploads, part of #475, also includes partial fix for #474 (rest is in previous commit)
nothing
Merge pull request #476 from modilabs/file_upload_fixes

File upload fixes
rebuilt
Merge pull request #161 from modilabs/master

file upload fixes + cleanup