core: preserve custom db users permissions on...

preserve custom db users permissions on upgrade

Up to this patch if custom users were added and assign privileges on DB
objects those privileges were removed when the db was updated or
refreshed.

This patch backups the privileges assigned to custom users and apply
them after the database was upgraded or refreshed.

Change-Id: If4ac85dc943fcb6a8f656a8ebeb172023e71c1ec
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1078129
Signed-off-by: Eli Mesika <emesika@redhat.com>