matches.php: Fix the return type of Match::getTeamX()
Fix ELO calculation
Add and fix tests for the Match class