Add ClientAPI source from codeplex

The main purpose of this pull request is to fix the 'Invalid JSON primitive' exception which is thrown on almost every request, but hidden from view. Discovered via Azure AppInsights.