MDL-43448 Links to the gradebook not fixed on restore.

Note we can only fix certain generic links, we can't handle ones like
/grade/report/{reportname}/index.php, but fortunately, we were only
using the generic ones.

I added a couple of other likely things too (badges and participants
list).