Improving the callout mediator to support inline endpoints. Applying patches from SYNAPSE-969 and SYNAPSE-970