This reverts commit a27d692656.
The reason for reverting is that this middleware has no effect. In Rails
5.0+, Sidekiq runs its jobs using the Rails reloader/executor API[1].
In Rails 5.0+, however, the ActiveRecord query cache registers its own
hooks with the executor[2], and these hooks automatically enable the
query cache for the duration of any work the executor performs[3].
As a result, the query cache is already on by default for any Sidekiq
jobs run in Rails 5.0+, so it's not necessary to separately enable it in
a middleware.
[1] eca6acc0ce/lib/sidekiq/rails.rb (L33-L37)
[2] f8c00c1300/activerecord/lib/active_record/railtie.rb (L159-L163)
[3] f8c00c1300/activerecord/lib/active_record/query_cache.rb (L26-L41)