pd: fix PD power swap when lots of protocol erros
pd: fix PD power swap when lots of protocol erros

Fix a couple bugs that cause problems when executing a power
swap with a poor PD connection.

1) If we are a sink switching to a source and we have turned on
vbus and then get an error, then make sure to turn off vbus.
2) If we are a sink switching to a source and we receive a
redundant PD_RDY, then ignore it.

BUG=chrome-os-partner:32392
BRANCH=samus
TEST=load on samus and connect port 0 to 1 creating a poor
PD connection with a lot of retries and missed responses. with
this change, I swapped power ~20 times with "pd 0 swap power"
and each time it was eventually successful.

Change-Id: Ib6b97961c7e40186a14ca1d2922b2ce6a6598180
Signed-off-by: Alec Berg <1a4429eeda29095a12e19a73405f80f5b7f37a63@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/241872
Reviewed-by: Vincent Palatin <70a9964ec8fd10b0b08fcc8623c2add25ddf99ac@chromium.org>

fourier49/BZ_DEV_EC,coreboot/chrome-ec,eatbyte/chromium-ec,md5555/ec,fourier49/BZ_DEV_EC,md5555/ec,mtk09422/chromiumos-platform-ec,coreboot/chrome-ec,mtk09422/chromiumos-platform-ec,akappy7/ChromeOS_EC_LED_Diagnostics,coreboot/chrome-ec,mtk09422/chromiumos-platform-ec,fourier49/BZ_DEV_EC,fourier49/BZ_DEV_EC,eatbyte/chromium-ec,akappy7/ChromeOS_EC_LED_Diagnostics,akappy7/ChromeOS_EC_LED_Diagnostics,coreboot/chrome-ec,eatbyte/chromium-ec,fourier49/BIZ_EC,akappy7/ChromeOS_EC_LED_Diagnostics,mtk09422/chromiumos-platform-ec,eatbyte/chromium-ec,akappy7/ChromeOS_EC_LED_Diagnostics,coreboot/chrome-ec,fourier49/BIZ_EC,md5555/ec,md5555/ec,fourier49/BIZ_EC,coreboot/chrome-ec,fourier49/BIZ_EC