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

I'm opening this as a PR for now until I have this tested on the Linux workers as well.

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.