Unlock MySQL tables when work is done.

`LOCK TABLES` works in a session, not a transaction. So if there are multiple
transactions (such as in a `rebase`), things can get confused. So override
`finish_work()` to unlock the tables.