No undeletion of courses of deleted institutions

When a user tries to view a course that has been deleted, links to
restore it are displayed. With this patch, if the course's
institution has also been deleted, links to restore the institution
are shown instead. The patch also prevents users from restoring
such courses by manually entering the URL to restore them.

Bug: 57837
Change-Id: I18cf2411f395388d2560eec87dc53c67818853ef