CRM-13234 define type for 'Country' custom fields (integer) as e-Notice was picked up by tests
updated example & a couple of tidy ups to throw API_Exception rather than legacy