MULE-8100: Use the real client address if the listener receive a request through a proxy. Set the real client address in the proxy template.

(cherry picked from commit 6421194922b0644687e68a57d753b8eb4bae3db6)
MULE-8100: Code refactor.

(cherry picked from commit f1374ae8f83fd60f380ebe87bfdd3887abbbaa02)