Fix cancel button in case of 'add' which does not supply referrer in GET
Some HTML validity fixes
Move diff generating code to before checking for TLE or runtime error
to allow the jury to see a diff up to when the submission ran.
Allow specifying soft:hard cpu and wallclock time limits to runguard.
Setup hardcoded soft:hard timelimits. This is WIP code and should be
made configurable.
Detect hard CPU-time limit.