Add a calculation of the league positions.

This adds a new positions property to the LeagueScores class that
returns a dictionary of tla -> position. This is calculated from
the current league scores and correctly handles league-point ties.

At the moment, this introduces a TODO on how we deal with ties of
both league points and game points. As far as I'm aware this hasn't
actually ever happened, but it is possible.

Change-Id: Ic112bcb6fe954cda7d9280049322a3a6bd6c6a1d
Make the collection of league positions an OrderedDict.

This makes it possible to trivially extract an ordered list of tlas
by just getting the .keys() of the resulting dictionary. Update tests
to confirm this behaviour.

Change-Id: I3c7230bd5e1b56f4e4b107b11d1bfb4c7b1e3e71
Add some overall testing of the first knockout round.

To get started on the testing of these, and to setup the required
inputs (of which there are a remarkably large number).

Change-Id: I7ddbf47743846f921edc568df01b0ac5ce9679d1
Add tests for calculation of knockout match 'winners'.

Move this to a separate function which is then used by the original
location. Add tests for the behaviours it is known to support at the
moment, making it easier to go to fix the known issues (see #2434).

Change-Id: Icdfa96d0fc62e6f301918325e844d2620ea4afed
Remove the now redundant seed_teams method.

This method returned an ordered list of teams, based on their league
positions. Since this information can be trivially extracted from
the already ordered sorted positions OrderedDict attached to the
league scores, there's no point working it out locally.

Move the check that we've played all the matches back into the
calling method.

Change-Id: I64283da7c3fb3bcf19ff630f21f5b15a7d72ff5e
Test the knockout first round before the league has ended.

It should be all ??? teams.

Change-Id: I61124fbff34a2d274dec8e49e8059f3d4c142f5f
Simplify and comment extracted method.

This makes it much clearer what's going on, but doesn't affect its
behaviour at all.

Change-Id: Ic73c81bf1ae32e3b219eb8146c5957359fc229b4
Fix #2434: Use league position to resolve knockout ties.

Previously, the posibility of ties was completely missing from the
logic which promoted teams from one match to the next during the
knockout stages. This commit resolves that using the recently added
scores.league.positions dictionary of teams' league positions.

Change-Id: I38ad3f9f6d4f00bcbf319a3c2b8491d8518f30ac