Add test for GH #799:

A problem we had was that if you tried to log in core level
with a log format that used the request, the application would
crash because there was no request set at that point yet.

This is a test that verifies it works.

It currently assumes on the Capture logger to also capture the
formatted message, which will be added by a following commit.
Logger::Capture should also save format_message() format:

When logging using the regular loggers, they call the
format_message method, but the Capture didn't because it wanted
to save the pieces for better examination.

This caused GH #799 hard to test with the Capture logger.

Now it also saves the formatted string.
Set the request for engines and App earlier:

There is no reason to set the request only when a route is matched,
since it will be the same request no matter which route matched,
and if we have another request cycle, the request will also change.

This caused GH #799 in which, if you use a format that needs a
request, it crashes because the app calls a "core" log in a piece
of code in which the logger engine still hasn't rececived the
request object.
Corrections to logging:

* Have a default app_name ("-"), used mainly in tests.
* Avoid calling the request if no request exists.
* Cleanup some tests.
reflect change
Merge branch 'issues/gh-799'