Followup https://github.com/qgis/QGIS/pull/8830 that fixed
a regression with rewritten urls in the server, unfortunately
my original solution introduced a side-effect on the POST
request, with the new approach I'm introducing a new method
to retrieve the URL as seen by the web server: by default
this is the same URL seen by QGIS server, but in case
a rewrite module made some changes, the original URL will
be used as a base URL if not overridden by a config setting.
This PR comes with an extended set of tests that should
cover both (rewritten and unrewritten) cases for GET and
POST and for WFS/WFS/WCS and WMTS.
The URL exposed in the XML documents generated
by the server was wrong because instead of
using the original URL (from REQUEST_URI)
the rewritten query string (from QUERY_STRING)
was applied to the internal mUrl variable.
This patch also adds some tests for the
FCGI request, that handle most common
scenarios with bot rewritten and not
rewritten URLs.
QgsFcgiServerRequest is now exposed to
Python mainly for testability purposes.