db: handle corner cases when we have the match race
db: handle corner cases when we have the match race

1) When the match is entered get the ladder for both players on match date
2) Determine whether the challenger is from the lower or the same ladder
3) Determine if the challenger should have been promoted on the match date
4) If yes:
   4a) If challenger is already in the promoted ladder (something else already
       promoted him), add 30 points and increment match counters (credit the
       promiting match
   4b) If the challenter is already in the higher hadder (something else promited
       him to even higher ladder), add no points, but increment ladder match
       counter
   4c) If the challenger is still in the lower ladder do the normal promotion
   If not:
   4d) If the challenger is still in the same lower ladder, credit the match
       normally (add points, increment match counter)
   4e) If the challenger is in the higher ladder (something else promoted him)
       do not add points, but increment the match counters for the lower ladder

Signed-off-by: Ilija Hadzic <47a09d4a4430975766160361f65fc72633be50b6@gmail.com>

ihadzic/jim,ihadzic/jim,ihadzic/jim