CRM-12133 option value create value & weight

CRM-12133 fix default handling to be in BAO layer, also add tests on component_id & add to xml
comment tweak
fixes to value and weight handling CRM-12133
CRM-12133 per https://github.com/civicrm/civicrm-core/pull/188#discussion_r3442600 only set defaults if NULL, NB this is not subject to any unit tests so I have some reservations about changing it from prev behaviour but totten's comment seems reasonable
CRM-12133 - api/v3/CustomSearch - Fix option_group_id error
CRM-12133 - api/v3/ReportTemplate - Fix option_group_id and component_id errors
CRM-12133 - CRM_Core_BAO_OptionValue - Fix copy-paste error
Merge branch 'CRM-12133' into master-CRM-12133