Fix log correlation by request uuid

Uuid correlation was set too late. It was showing wrong uuid for log
messages when uuid is being logged and level is set to :debug.

Uuid is now set in middleware right after request uuid determination
before any logging occurs.
Merge pull request #2343 from pitr-ch/quick/logging-uuid

fix log correlation by request uuid