fix reloaded app import path when starting app with python -m werkzeug.serving module:app
added middleware that can encapsulate a lazy loaded app