update rails to 3.2.18

- copy pasting parts of the hw updates pull request: https://github.com/saasbook/hw/pull/44
- also needs rag/hw4_grader_stuff/hw4_rottenpotatoes to be updated by some variation on https://github.com/saasbook/rag/pull/35
- replaced therubyracer in Gemfile
- no patch spec for rails version,
- updated the application.rb with everything, even the json escape thing
- ###movie model got all fields except students would now have to add :director to attr_accessible which should be in the courseware.
- Tests in saasbook/hw are not configured to use this, but that would be another pull request.
- The change of feature test on this should be similar to https://github.com/apelade/hw/commit/99d0f0870302c6c8a77059093223ef30c18b51ee