Jruby pg

I thought I should open a pr to get the ball rolling. This still needs some work, there are currently 9 failures that I need to fix. Feedback is welcome, specially with the changes to the Rakefile, etc.