Fix order dependent AP test

any_instance.stubs + unstub with Mocha doesn't restore the original status in the following case,
so we need to undef Customer#to_json before every test

require 'test/unit'
require 'mocha/setup'

module M
  def foo() :foo; end
end

class C
  include M

  undef_method :foo
end

C.any_instance.stubs(:foo).returns(:mocha)

C.any_instance.unstub(:foo)
Fix order dependent tests

Reset ActionView::Base.logger after tests
Reset ActionView::Base.logger instead of AC::Base.logger

see: 9b0ac0bc74569db460f87ea6888b3847be0ff5be
Don't mutate the Base settings by merge!ing the given value
Fix order dependent tests

Restore default ActiveSupport::XmlMini.backend after tests
Be sure to restore the default I18n.locale after changed its value in a test
Refactor handling of action normalization

Reference:
Bloody mess internals
http://gusiev.com/slides/rails_contribution/static/#40