MDL-39449 course view.php: don't require forum lib.php

As far as I can see, it is not used, except in social course format, so
I moved the include there.