Display portal links only if the flag is activated (bug 917698)

I added a new method to amo.tests.TestCase: `extract_template`. Quite useful to test html within javascript text/templates.