[API] Retry request on galera deadlocks

It is possible in a multi-API situation for galera deadlocks to still happen.
This patch will trigger a retry in these scenarios.

Change-Id: I3c62a9a39f6dec921dee8106b7a3a98cf1095f6d
[API]: Also catch galera issues in WSME

Change-Id: I06bbeb2bb6db0677bfe2e267d1734dde54462109