Add join on contestproblem in calcTeamRank
Truncate output fields when retrieving from the database.

Saves a lot of data transfer both on output and between web and DB.
Pass contestdata to calcContestTime in a ad hoc way