CRM-13141 restructured code to handle empty 200 result from public extensions directory.

----------------------------------------
* CRM-13141: Manage Extensions throws an erroneous fatal error - Failed Fetching List - when there are no extensions available for a particular install version
  http://issues.civicrm.org/jira/browse/CRM-13141
CRM-13139 - CRM_Utils_REST - Accept empty JSON objects ("{}")

Note: When the "json" parameter includes malformed JSON (eg "{") or an empty
string (""), the behavior is unchanged. This only affects a well-formed empty-obect.

----------------------------------------
* CRM-13139: REST API: json_decode() fails for empty input
  http://issues.civicrm.org/jira/browse/CRM-13139
Merge pull request #1299 from totten/master-rest-empty-json

CRM-13139 - CRM_Utils_REST - Accept empty JSON objects ("{}")
Corrected issue in patch noted by Tim on PR.
Merge pull request #1298 from davecivicrm/CRM-13141

CRM-13141 restructured code to handle empty 200 result from public exten...