Refactor eval code in preparation for new task types.

Review Request #205 - Created April 10, 2012 and updated - Latest diff uploaded

Bogdan-Cristian Tătăroiu
Previously, our eval code consisted of a 300 line method in
classic_grader.php, which was painful. :(

I've split the functionality into separate methods inside a BaseGrader
and ClassicGrader class. BaseGrader provides functionality which is
common for all task types such as setting up a jail, compiling
evaluators, handling test groups, judging outputs (via diff or custom
evaluator), etc. Every different type of task will require a new class
which extends the BaseGrader and implements the method testCaseJudge
which will contain the task type's specific behaviour. Other methods
in BaseGrader can be subclassed as well: for example, for output only
tasks one would replace the 'compile user source code' method with a
'extract user outputs' method.