Refactored to abstract away from FCGX_Request.

That's mostly hidden in `struct fcgi_request` now, so the rest of
the code is clean to start extracting testable libraries.

Note that for full frontend independence, the threading model will
have to be sorted out / extracted as well.
Extracted common parts to library for testing.