files_ref_store: use a transaction to update packed refs