[ticket/11370] Effectively installed migrations not inserted into table

insert_migration() function now handles inserting/updating

Move all insert/update code to insert_migration() function to prevent this from occurring again.

PHPBB3-11370
Merge remote-tracking branch 'EXreaction/ticket/11370' into develop

# By Nathaniel Guse
# Via Nathaniel Guse
* EXreaction/ticket/11370:
  [ticket/11370] Effectively installed migrations not inserted into table