core: Fix temproaral disabling foreign keys

The temporal disabling of foreign keys did not work
causing upgrade to fail

Change-Id: I32867ef58f179428c69e74d61a89dc6b2b9c2e89
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1091227
Signed-off-by: Yair Zaslavsky <yzaslavs@redhat.com>