core: Fixing duplicate scripts recognition

The upgrade utility should recognize that a script was installed before
with a different prefix in order to only record it an skip its execution.
This is done by recording in the database the md5 for each upgrade
script so if a script is already installed and have the current script
md5 , the new script will be recorded to the schema_version with a
SKIPPED state and a comment saying which is the script that was already
installed the contained code.
This functionality of the upgrade utility was broken as a result of the
following commit : 38e8f8aae8b4a92e6c191ca1d4df1b54eae581f2
This fix is mandatory for fixing the original bug and therefor ordered
as a pre-patch of it.

As a result of this change the following fix has been reverted:
"When running create_db.sh scripts 03_00_0420 and beyond are executed but
not inserted to the schema_version table.
This is caused to a race since execute_command is running in a loop
and creates a temporary file in each iteration.
Solution is to gather all inserts in one file and execute them at
once."

Since this is just a problem with the logging to schema_version table
and the scripts are executed correctly I am reverting this fix since the
problem caused by it is much higher than the minor lack of recorded
data.

Change-Id: I2e887acc0e3bb266354af2ac5e77e5aec8537454
Signed-off-by: Eli Mesika <emesika@redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=903604