fix(core): prevents upgrade scripts from attempting to create the same ElggUpgrade more than once

Attempting to create two ElggUpgrade objects with the same URL causes a fatal error. Now the
scripts check whether the ElggUpgrade already exists.

Fixes #6824
Merge pull request #6831 from juho-jaakkola/issue_6824

Prevents upgrade scripts from attempting to create the same ElggUpgrade more than once