Enable local settings
Upgrade requirements + migrations
Fix score calculations in backend

Score calculations (and other stuff) was broken in the backend
because there was a reliance on how result sets were ordered.
This worked in sqlite because there they are ordered by primary
key. However this was undetermined in postgres and broke badly.

The fix is to use a through field on the many-to-many relationship
between a participant and a match. There we can add a player_nr to
indicate who is first and second player.

This commit fixes the backend problems but does not fix them in
front-end (which also makes use of the ordering). This will be
fixed in a future commit.
Also fix participant ordering problem in frontend