lib: handle access denials in upload_file()

curl provides an error code which can be used to detect invalid
credentials.

This patch adds a support for re-trying upload with new credentials.

Related to rhbz#1066486

Signed-off-by: Jakub Filak <jfilak@redhat.com>
upload: read credentials from environment variables

We use environment variables for the per-user-configuration.

Adding new configuration options to the configuration file for
credentials doesn't make sense because the credentials can be part of
the URL (everything is plain text in the configuration file). But it
does make sense to add a support for environment variables which are
used to propagate the configuration from the GUI where the URL field is
plain text but the password field cannot be read.

Related to rhbz#1066486

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Merge pull request #288 from abrt/rhbz1066486_upload_secure_password

Allow users to configure password outside of an upload URL