Bugfix: There is no flush_checks

This seems to be a typo when altering this code in the past.
Bugfix: Use the right build versions
Bugfix: Fix possible wrong TTK build version on the DB

This is a followup for the previous commit.

Saving an old Translate Toolkit build version is not a problem, because
when later running the upgrade for Translate Toolkit the current latest
build will be saved.
Cleanup: Move code to upgrade management command

Since it is the only place where it is used it makes sense to be there.
This allows to keep the module __init__.py for code more focused on the
upgrade machinery internals.
Cleanup: Remove unnecessary intermediate upgrade function

Just complicates the code.
Cleanups

To ease further refactoring and improve readability.
Cleanup: Now `buildversion_for_fn` always returns an int

So no need to convert the retrieved build version in other places.
Cleanup: Pass the function instead of the function name
Cleanup: `filter_upgrade_functions` already receives the function build

Still wondering why this code worked.
Cleanup: Just do the comparison instead of calling function