packaging: setup: backup database before clearing

move backup restore into utilities, to allow reuse.

move pgpass creation into common.

Change-Id: I89635b7bf6e86fb3bf3657717a903b1efb127b9a
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>