Use row-level locking to handle database operations (#118) * pglock: remove unnecessary transaction to execute heartbeats * pglock: remove unnecessary transaction to execute releases * pglock: remove unnecessary transaction to execute lock acquisitions