Remove dependency on ActiveSupport.

ActiveSupport may already be present in Rails, but for other Ruby
applications it introduces more gems and bloats the memory used.

As far as I can tell, the only two methods used from ActiveSupport
are effectively aliases of standard Ruby methods, and we can safely
use the normal Ruby methods instead.

However, if it's possible that (for example) `env` is `nil`, then we
should add a test to cover that and include specific logic to cope.