Refactor middleware to use instance variables instead of closure.

- This provides an easy access point for some attributes, and

- will help with some forthcoming features.
remove some extra code checked in accidentally.
Merge pull request #1 from zopefoundation/satchit-refactor

Refactor middleware to use instance variables instead of closure.