Add API authentication helper.

This is a small helper service that takes Basic Auth credentials and turns them into custom HTTP headers that an API can look at.

Eventually this will grow to support OAuth credentials instead (but probably not in this PR).
I named the ones that return deferreds ``check_`` so that people didn't
think they were synchronous which I felt ``assert_`` implied (i.e. just
assert some things).