NSX: Fix possible deadlock in sync code

This patch removes the call to nsx from within the db transcation
which can cause deadlock if another request comes in during this time.

Closes-bug: #1278991
Change-Id: If16b53a77997bccfdff2554dead26f42e23eaec9
(cherry picked from commit d59d5a1c72c2324b857225680f5578d381a2ec73)
Merge "NSX: Fix possible deadlock in sync code" into stable/havana