Fixed #5418 -- added assertNoBrokenLinks to test system

Check for broken links in a rendered page. By default only internal links are
checked, if `only_internal` is `False`, external links are checked too.

This commit adds the patch, the tests and the docs where the possible side
effects of this test are noted.
ticket #5418 -- ensured python 2/3 compatibility
ticket #5418 -- documentation notes
Ticket #5418 -- don't follow redirections unless specified