Lock tables for update on allocation/deletion

Allocating, creating and deleting port might happen
in parallel and we need to make sure we don't
assign same IP to multiple different requests.

Added treatment for vlan tags and tunnel ID's

Fixes: bug #1110807

Change-Id: Idbb04d3ce6eacd308b05536f1942a35a0792199e