Add tests for restricted forum searching

These tests cover some of the forum= querystring handling behavior to
fix bug #617018.