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

----------------------------------------
* CRM-14843:
  https://issues.civicrm.org/jira/browse/CRM-14843
Merge pull request #3533 from davecivicrm/CRM-14843

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