MULE-8018: Merge http connector code cleanup

Changes in the outbound part after code review feedback