fixes for create api and also added conditional fetching of case type definition, CRM-14725

----------------------------------------
* CRM-14725: Edit Case Type - Use AJAX load/save
  https://issues.civicrm.org/jira/browse/CRM-14725
Merge pull request #3374 from kurund/CRM-14725

fixes for create api and also added conditional fetching of case type de...