CRM-13551 : fix for point 'a)' mentioned in issue - the json object was not properly getting created

----------------------------------------
* CRM-13551: Fix bug in Activity Form
  http://issues.civicrm.org/jira/browse/CRM-13551
CRM-13551 : includes 'point b)' fix as well as code improvement

----------------------------------------
* CRM-13551: Fix bug in Activity Form
  http://issues.civicrm.org/jira/browse/CRM-13551
Merge pull request #1766 from pratik-joshi/CRM-13551

CRM-13551