Add facility to register Rack middleware with arguments.
Add missing Adapter#log method.
Bump version to 4.0.2.