Ensure route in test does not capture references to variables on stack
Make the test tst_QHttpServer::checkRouteLambdaCapture(), which adds two
new routes that capture references on the stack, capture by reference to
class member variable once instead. There is no reason to do the same
test twice.
The potential use after return in the test was discovered by the address
sanitizer, though the route is not used outside of this test.
Fixes: QTBUG-144180
Change-Id: If3c1bfacc706004ed13171c71dd7a182064ce3d7
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>