Make compatible with pedestal-service

Hi remvee,

I needed to use your ring-basic-authentication library with pedestal-service interceptors (http://pedestal.io/documentation/service-interceptors/), so I extracted the core logic of the middleware into separate functions.  All tests are passing.

Cheers,
Bobby