Avoid race conditions (if possible) when switching Projects.

Avoid race conditions (if possible) when switching Projects. Also
gracefully handle someone disconnecting an old version companion and
then connecting with a new version.

Change-Id: I74892de50824d8fd97fcd4222f7440ca0b0b00ea