Add load hooks for the middleware

Add Active Support load hooks for the middleware stack to make it easier to load middlewares into the stack.

Bump the minimum version of AS up to 2.0 since it's (at least) what we need to load middlewares and older versions are no longer supported.

// @localshred