Added CheckPending middleware in default

As this middleware comes by default in a new
rails app

Added test to check omit for CheckPending when

Active Record is not included.