CRM-13986 - CRM_Core_Invoke - Handle HTML and WS requests differently

For HTML, use the CMS's output mechanism (with its theming, etc)
For web services (or any non-HTML content), use Symfony's output mechanism
Merge pull request #2535 from totten/master-symfony-ws

CRM-13986 - CRM_Core_Invoke - Handle HTML and WS requests differently