Retry on DB deadlock timeout errors

When deleting ports and networks concurrently, because of
known incompatibilty of eventlet and MysqlDB, DB deadlock could
occur, causing API to fail.  The proper fix for this would be to
make all APIs non-blocking, and/or use an eventlet-compatible
MySQL library like mysql-connector.  Until such proper fix is in
place, simply retry on such error to avoid API failure.

Change-Id: Ie94dedab87fb4bfe7ee5b7525c1ffae27fdcc28a
Fixes: MNP-11