Handle VisualEditor when it skips the "tempWikitextEditor" stage
Depending on the user's internet connection, the code that sets up
mw.libs.ve.tempWikitextEditor may be completely skipped if the normal
editor code loads fast enough.
Refactor the code to handle all three cases using the same function.
Bug: T185279
Change-Id: I003b27f838d1986ed8d238089efd657b96e8ec91