Respect direction when deciding the source and dest of a transaction.

It can happen that the first message that we see in a TCP stream goes
from the server to the client. With this change, we make sure to consider
the direction of the request when deciding what is source and what is
destination.