pd: Prevent trasmitting messages if rx messages are pending
pd: Prevent trasmitting messages if rx messages are pending

This CL adds a check in pd_transmit to prevent sending tx messages if
there are pending rx messages to be processed. This fixes an issue
where a power role swap request is received, but before the accept
reply can be sent a VDM discover identity message is sent which
confuses the other side of the connection.

BUG=b:140092163
BRANCH=None
TEST=Tested with the AA-AM1N95W charge through hub. Verfied
that this can be attached to Kohaku with external power already
connected and successfully power role swap into source to charge the
kohaku port. Tested 20-25 connections with no failures. Prior to this
change the failure rate was 1 out of 3 attempts.

Change-Id: Iebe53e0fc52bf817b709d58ef3e0ee7b226b0aa9
Signed-off-by: Scott Collyer <7d40b3eb9e17bf55d972074a5e77a7ea4159f9dd@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1799288
Reviewed-by: Jett Rink <9d4aef0593e6843318d99df31597fb6153b89787@chromium.org>
Tested-by: Tim Wawrzynczak <86444811eee8c2cb29e29a251d7a069e64ccc665@chromium.org>
Tested-by: Scott Collyer <7d40b3eb9e17bf55d972074a5e77a7ea4159f9dd@chromium.org>
Commit-Queue: Scott Collyer <7d40b3eb9e17bf55d972074a5e77a7ea4159f9dd@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec