Grade on demand simplification

Updated to simplify GradeOnDemand.php
Update to use CURL.
Update to parse XML returned from TC properly.
Updated to move grade setting back into lib.php.