ConnectNodeTestCase now passes

Modified p2pnode.connectNode so that the corresponding test cases
passes. (Fixed indefinite hang in test case itself.)