Fixes bug in category#index view and adds tests

There is a bug in the category#index view since it is expecting an
article object to exist. It seems it was intended to only display
categories with published articles so I added the code needed for that
(and tests). I also moved dotenv-rails in the Gemfile so that it is
included in the production env.
removed logic from articles/index/html.erb
added Category::with_published_articles, called in controllers
merge conflict in ArticlesController
pulled db logic out of home/category partial