Do not lock when creating a new archive id

By using a sequence table. refs #6417 
LAST_INSERT_ID(expr) is a nice trick which I didn't know! :+1: