Merged r3705 from trunk.
Merged r3702 from trunk.
Backported r3692 from trunk.
Merged r3678 from trunk.
Merged r3682 from trunk.
Fixes theme discovery under JRuby on Rails war structure (#632, #5404).
Fixes workflow edit with JRuby (#5404).
Fixes time report with JRuby (#5404).
Fixes random test failure.
Removes broken code in ProjectsController (#5412).