Add cursor.close for Python and Ruby

See #115 

@mglukhovsky would you mind taking a look?