Protect contentious transaction with a semaphore

   This create_port request generates highly contentious
    transactions to allocate unique IP addresses updating
    a single table. Locks work better than transactions to
    handle contentions here.

Let's discuss it later before merging it.