Working implementation for issue-1216
issue 1216: added functional test file
Revert "issue 1216: added functional test file"

This reverts commit 6b69db132c6b50aa3885c7556044694668eb75de.
isue-1216: added functional tests
Revert "isue-1216: added functional tests"

This reverts commit ac1f4420d05eb2927117bb9332a4c29da34d6201.
issue-1216: added functional tests
issue-1216: improved code quality
Improve performance of grader-group assignment

Grader assignment to groupings are currently done in nested loops, so
each grader/group combination will issue a query to the database, which
is slow. This can be solved by doing a bulk operation in single queries.

The view also requires some fields that are not eagerly loaded in the
controller, which introduces n+1 query problems.

This patch improves the back end performance of assigning, randomly
assigning and unassigning graders, as well as populating the grader
index page. Assigning graders to criteria is still slow. The front end
is also super slow (it takes a few seconds just to check all the
checkboxes when the number of groups is over 1000!).

This partially solves #1443. The front end JavaScript also has to be
GREATLY optimized to fully resolve that issue.

Tested:
- rake test:units
- rake test:functionals
- local server testing
  - with
    - 2 assignments
    - 3 TAs
    - 1000+ students and groups
    - 2 * 3 * 1000+ = 6000+ TaMembership records
  - wall clock response latency is < 5 second for the optimized
    operations (only counting the back end, the front end can take more
    time than the back end to load)
Fix tests affected by modified parameter format

The query paramters for unassigning graders are changed from
<grouping_id>_<grader_username> to <grouping_id>_<grader_id>, so some
test cases need to be updated.
Add tests for Assignment#criterion_class
Add tests for update_assigned_groups_counts
Add tests for new class methods of Grouping
Fixed merge conflicts.
Formatting. Also changed the yes/no radios to checkboxes. Associated allow remarks label with the checkbox.
Added client-side required fields checks. Also moved most JS calls from the form's HTML to within create_assignment.js. Most Prototype within create_assignment.js converted to jQuery.
Deleted 'Head >>>' comment from previous merge conflict.
Style Formatting.
Style Formatting.
Style Formatting.
Set rghost version

Seems like rghost 0.9.4 is incompatible with ruby 1.9.3.