Refactor dispatch implementation for Wsgi class

Provides less tear down and build up of exception scopes and cleans up
all branching.