2785d6f2bd
When restoring a backup containing a question bank, we were always trying to match questions to an existing category on the target course if once existed. This meant that when duplicating a qbank on the same course, or importing the same qbank to another course multiple times, only one of the restored qbanks would end up with questions in it. This adds a mechanism to record any activities in the backup which support `FEATURE_PUBLISHES_QUESTIONS`. Then when we restore the questions, we check if we will be restoring the original activity they belong to, and skip trying to match them to an existing category. This means a new copy of each question will be created, and moved to the new copy of the qbank once it is created.