CRM_Case_BAO_CaseType - Make XML<=>Array conversions easier to test
CRM_Case_BAO_CaseType - Add test for XML<=>array conversions. Fix corner-cases.