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