Fixes a few issues with how we initialize the middleare.
- Always completes the intitialization task
- Avoids capturing the ExecutionContext
- Allows initialization to occur repeatedly when it fails
Adds logging for the most common things that can prevent an endpoint
from matching.
Note that we already have good logging in other parts of the system, the
stuff here completes the story by providing details at the debug level.