Precompile assets before build and clean up after for Rails apps

This should mean builds fail if we have assets that aren't correctly precompiled. At the moment, it's too easy to get broken stuff going into production.

This does require an extra step in the app itself (mainly adding an initializer and an ENV variable into Jenkins), but if it's not there, things won't break.