ensure restored engine db objects are owned by engine user

When restoring a DB from a 3.1 system that upgraded from 3.0, onto
another 3.1 system that wasn't upgraded from 3.0, then you encounter
permission denied messages from postgresql because the engine DB objects
are owned by the postgres user instead of the engine user.

This patch checks to see if the engine DB objects are owned by the
engine user and if not, alters the ownership.

Change-Id: I5f16f66066d9056c97a32f180c02d8bd248d1eac
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=923614
Signed-off-by: Mark Huth <mhuth@redhat.com>