Add capture_io method from Minitest

I was writing a builder with [thor](http://whatisthor.com/) and wanted to test my task with proper output. What I needed is to capture `$stdout` and `$stdin` to test those things. I searched the web for it and could only find [capture_io frm Minitest](http://rubydoc.info/gems/minitest/5.0.6/Minitest/Assertions#capture_io-instance_method).

The main idea of capture_io is written in the following snippet:

```ruby
require 'stringio'

def capture_io
  captured_stdout, captured_stderr = StringIO.new, StringIO.new

  orig_stdout, orig_stderr = $stdout, $stderr
  $stdout, $stderr         = captured_stdout, captured_stderr

  yield

  return captured_stdout.string, captured_stderr.string

ensure
  $stdout = orig_stdout
  $stderr = orig_stderr
end

out, err = capture_io do
  puts "Some info"
  warn "You did a bad thing"
end

puts out
```

It is really just a helper method and @myronmarston mentioned on twitter the following:

<blockquote class="twitter-tweet" lang="en"><p><a href="https://twitter.com/wikimatze">@wikimatze</a> It does not, but I&#39;m open to adding a matcher for it.  Want to open an issue?</p>&mdash; Myron Marston (@myronmarston) <a href="https://twitter.com/myronmarston/statuses/415191314787876864">December 23, 2013</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

I tried to implement it as a matcher but lowered the code coverage. I'm not sure what and how to test it, help is more than welcome.

If anybody wants to use the ability before it's included in RSpec you can make use of by adding the following lines to your `spec_helper.rb`:


```ruby
require 'minitest/unit'

RSpec.configure do |conf|
  conf.include Minitest::Assertions
end
```

If this pull request is excepted, I can cleanup my helper and stay in the RSpec environment.

Happy Xmas.