Remove Gemfile.lock: it's superfluous for libraries.
Use atomic updates for cursor sequence.

Cursor variable names are scoped to individual transactions, and proper
use of ActiveRecord connections dictates that each thread gets its own
connection from the connection pool.  Therefore:

1. Two Ruby threads should never share the same connection.
2. Two Ruby threads should never share the same transaction.

It is therefore okay for two Ruby threads to create a cursor named
cursor_N, which means there should be no problem with unsynchronized
access to a cursor sequence variable.

Nevertheless, I am uneasy about it.  Hence this commit.