reporter-upload: factor out HTTP PUT upload

This patch adds HTTP PUT upload support to post()
helper function.

This simplifies send_file() in reporter-upload.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>