Transaction compatible in try-with-resource

Have Transaction interface extends AutoCloseable which makes transactions
able to participate in try-with-resource blocks, like:

  try ( Transaction tx = db.beginTx() )
  {
    // db operations
    tx.success();
  }

finish() method has been deprecated but parts of the code still use it.
The focus has been here to convert src/main code, documenting tests and
any code ending up in the manual.