Fixes Mercurial adapter for JRuby (#4494, #5404).
Adds jdbc rake tasks (#5404).
Adds test helpers for test repositories.
Fixes EOL style related test failures.
Fixes some textile issues with JRuby (#5404).
Backported r3683 from trunk.
Refactor: Pull up #find_optional_project to ApplicationController.
Merged r3705 from trunk.
Merged r3702 from trunk.
Backported r3692 from trunk.