Add 'get_middleware()' function to app - second attempt.

This attempt resolves feedback from the first (https://github.com/ipkn/crow/pull/29)