Add the ability to authenticate to S3 directly

With this change, the key and keyid may be passed directly to a REST method, making it possible to use multiple S3 accounts in the same installation.