Add hashes to JS and CSS files for cache invalidation

Only do it for JS on production as requirejs makes this hard on
development and it shouldn't really be needed there either.

When I say it makes it hard I mean that because it's requesting lots of
files and then using the path of those files as the module name putting
in place the code to resolve this is both painfully manual and hence
error prone and also problematic because of the way require handles
fetching. Given cache busting is only really an issue with production
deployment it's not worth the pain.

For #554