Start writing unittests for the bridgedb.HTTPServer module.

The ReCaptchaProtectedResourceTests.test_render_POST_* unittests expose
the bug in #11231.
Fix CaptchaProtectedResourceTests.test_render_GET_noCaptcha unittest.

We shouldn't return ``(None, None)`` in a stub method when all the other
methods and child classes expect ``(str, str)``.
Update documentation for CaptchaProtectedResource.getCaptchaImage().
Explicitly require CaptchaProtectedResource.checkSolution() to be True.

 * FIXES #11231.
Add optional debugging logs to test_HTTPServer.py.
Change the requested pagename in CaptchaProtectedResourceTests unittests.
Add a mocked DummyBridge class to test_HTTPServer.py.

This is used to test that bridges are actually returned on
'bridges.html' results pages, and is missing all of the real class's
methods except for `getConfigLine()`. The latter method needs to be
mocked because is used in `HTTPServer.WebResourceBridges.render()` to
get the bridge line to display to a client.
 Add a mocked DummyIPBasedDistributor class to test_HTTPServer.py.

 A distributor is a required parameter to the
`HTTPServer.WebResourceBridges` class. This one merely creates N random
`DummyBridges`, where N is the number of bridges we're told to return to
the client.
Add class wrapper for requesthelper.DummyRequest to support redirects.
Use the class wrapper DummyRequest in unittests in test_HTTPServer.py.
Fix X-Forwarded-For unittests in CaptchaProtectedResourceTests.

Apparently, we can't do:

    request.setHeader('X-Forwarded-For', '1.1.1.1')

because then BridgeDB never finds the header. Instead, we must do:

    request.headers.update({'X-Forwarded-For': '1.1.1.1'})
Always expect a Deferred from ReCaptcha.checkSolution().

Currently, we `checkSolution()` will return a RecaptchaResponse if the
HTTP POST argument fields are blank. Otherwise, it returns a
deferred. This is bad. It means we have to do all kinds of checks to see
if we can add callbacks on the returned object. It should always return
a deferred which callbacks with a RecaptchaResponse, and so we should
test for that and fail if that is not what is happening.
Add unittests for HTTPServer.WebResourceBridges.
Add a steaming pile of XXXs and FIXMEs to problems in WebResourceBridges.
Fix txrecaptcha.submit() to always return Deferreds.

All returned Deferreds callback with RecaptchaResponse objects. This
way, we do not need additional code to check if the result was a
Deferred (because, in that case, we would need to add a callback
function to extract the RecaptchaResponse object from it and check it),
or if it directly returned a RecaptchaResponse.

This function now *always* returns Deferred.
Merge branch 'fix/11231-blank-captcha-field' into develop
Merge branch 'fix/11231-additional-bug-fixes' into develop