Removed Ruby warnings.

- Using instance_variable_defined? to check if an ivar is set.
- Using `unless` instead of `if !` (didn't throw a warning, but eye-catching).
- Using MiniTest::Test instead of MiniTest::Unit::TestCase.
Adapted warning specific code.

- Setting instance variables to nil instead of using instance_variable_defined?.
- Use minitest ~> 5.0, defined in gemspec.
Merge pull request #188 from tbuehlmann/ruby-warnings

Removed Ruby warnings.