Moved creation of FK from SQL to perl script.

If the table queue_standard_template is not consistent with standard_template
IDs, the SQL statement to create its FK will fail preventing the correct
migration of OTRS, then this FK are now created in the perl script after
the queue_standard_template is cleaned for not existing Standard Templates.