packaging: on upgrade first backup

Backup before doing any changes to the database

Dump only schema for changing ownership

Run all ownership changes in a single psql command

Bug-Url: https://bugzilla.redhat.com/1046679
Bug-Url: https://bugzilla.redhat.com/1046676
Change-Id: I1b85a6aee99e94856b233f1c2285fd69e31e053f
Signed-off-by: Yedidyah Bar David <didi@redhat.com>