Gateway 3443

Improves performance in two distinct ways:
- As soon as a matching soap header is found, return it.  Old implementation continued to iterate through all headers, even after a match was found.
- In event logging, only construct the event (which is expensive) if it going to be logged somewhere.