Upgrade to rails 3.1.2 and jQuery

Major changes application-wide to upgrade to rails 3.1.2. Old config
files marked “.rails2”. Still work in progress.
Continuing upgrade to 3.1.2