[TAV-458] Use javascript_tag to inline scripts.

This fixes a bug where a script tag used "application/javascript" as its type
and browsers were not executing the code within. Now it is up to the helper to
set the tyoe field.
Relax the rails version number required.

This was originally developed with 3.2.12 so we can probably allow versions from
then on in the gemspec.