Implemented Wrap function to create http.Handlers.

The Wrap() function now takes certain functions with the right signature
and turns them into functions that can be used as middleware.