Raft of post Rails 4 changes

Much of this is as a result of testing on Heroku. Best practices for
Rails 4 are different in a few places than Rails 3, e.g. Unicorn.

The change to slim is motivated by lack of streaming support. Old haml
views will remain for now.

Going more vanilla on javascript loading is for cleaner turbolinks.

The rest are mainly bugfix and cosmetic changes.