Initial fixes to make ruby driver work with threads.
Ruby style fix.
Ruby driver bug and concurrency fixes.
Merge branch 'mlucy_ruby_driver_fixes' into next