refactored dependency related tasks into more OO manner and
use better integration of java and ruby.

this also avoids opening many streams (to files) instead it
needs only one stream at a time.
move ruby code around the gemspec into its own class
Merge pull request #770 from mkristian/extract-gemspec-into-its-own-object

Extract gemspec into its own object