read RbConfig in doctor.rb

instead of depending on Homebrew-defined constant.  This
is simpler now that we assume Ruby 2.0
require mocha/api for RSpec tests

to be removed from Homebrew-fork
strip down testing_env.rb from homebrew-fork
Merge pull request #8264 from rolandwalker/homebrew_strip_test_env

Homebrew strip test env