MULE-8018: Merge http connector code cleanup

I will take a look at it but don't know if I'm going to change it. This functionality has been extracted from a grizzly example.