Fix bug where receiving EOF on the RPC connection could cause RpcConnectionState to go into an infinite promise loop.  Strange that this did not cause trouble earlier.  Also some minor tweaks.