directory-cache: change signature to use AWS's v4

In order to do this as cleanly as possible, this also includes a refactoring of
the DirectoryCache implementation. The external API is shrunk to only the parts
used, but otherwise hasn't changed much.

BREAKING CHANGES

One change that could possibly break:

- The `host` config for s3 cache is no longer used. Use `region` instead.

This should not affect our Linux workers, since none of them use this config.
The OS X worker does use it, but this change is made to attempt to fix the
broken implementation.
Merge pull request #257 from travis-ci/hh-aws-signature-v4

directory-cache: change signature to use AWS's v4