chore(tests): persistent login tests are no longer fragile

The persistent login component unit tests were failing when run close to
the border between seconds on the clock because ElggCookie::setExpiresTime
depends on the current time. I refactored to allow injecting the current
time into the persistent login component.

Fixes #6829
Merge pull request #6830 from mrclay/6829

fix(tests): persistent login tests are no longer fragile
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