core: deleted trigger on db upgrade

The upgrade script 03_05_0730_drop_disk_image_dynamic_fk.sql replaces
the use of a cascade delete of a foregin key with a trigger.
When performing a further update to the db, the functions are being
deleted with CASCADE, which will cause the trigger and the function
to be deleted and never be added again.

The quick solution is to move the trigger/function creation to
disk_image_dynamic_sp as we currently don't have any trigger creation
infrastructure after update is performed.

Upgrade script is provided as well to perform cleanup of orphand records
that might have been left in disk_image_dynamic.

Change-Id: I594cddb968795a5a6a0d04e2c6bed9002c025ef9
Signed-off-by: Liron Aravot <laravot@redhat.com>