SQL database - split loadProfile to have retry flag

Instead of assuming that newUser() worked as intended, we cycle back around into the method.
This also removes the possibility of infinite loops from the writeMissingRows() code path.