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
Set rghost version

Seems like rghost 0.9.4 is incompatible with ruby 1.9.3.
Merge pull request #1479 from zhangsu/assign_grader_performance

Improve performance of grader-group assignment
Merge pull request #1504 from arkon94/assignments-format

Assignments form formatting. Fixes #1486
Merge branch 'master' of git://github.com/MarkUsProject/Markus into assignment-required
Fix for undisabling submit button in Chrome. Disabled buttons show not-allowed or normal cursor instead of pointer (depends on the browser/OS, I guess).