Add support for Faraday's updated middleware_registry interface.

Faraday dropped the `Faraday.register_middleware` interface with the 0.9 release.  This switches the registrations to use the object registrations available in Faraday 0.8 and 0.9.

Support was not added for Faraday 0.7 since the current gemspec of this library is 0.8+.

This fixes issue #1.