fixes for CRM-12956, bug in calculating custom field id

----------------------------------------
* CRM-12956: CiviCRM custom fields (with selects) in Views are a mess
  http://issues.civicrm.org/jira/browse/CRM-12956
Merge pull request #115 from kurund/CRM-12956

fixes for CRM-12956, bug in calculating custom field id
Merge remote-tracking branch 'upstream/7.x-4.4' into 7.x-4.4-7.x-master-2014-02-05-17-16-05