CRM-14843 - fixes for upgrade script including INSERT IGNORE usage.

----------------------------------------
* CRM-14843:
  https://issues.civicrm.org/jira/browse/CRM-14843