Pass output explicitly to output actions.

This makes things more explicit and simpler at the expense of the action
functions no longer being of type http.HandlerFunc