gem paths fixes and refactor

this is based on @ph PR #2200.
this has been tested using JRuby as the default interpreter with
```sh
rake bootstrap
rake plugin:install-defaults
./bin/logstash rspec vendor/plugins/jruby/1.9/gems/logstash-*/spec/{input,output,filter,codec}s/*_spec.rb --order rand
```

this has not been tested with MRI as the default interpreter.
Let's add a `gem_path` method to LogStash::Environment that returns this array. It'll avoid copy/paste of same code in Environment.set_gem_paths! and here.