setConnected
Mark p as connected or not. This is the candidate-bookkeeping core of peer_list::set_connection (when connecting) and connection_closed's pointer clearing. Setting connected clears the TorrentPeer.maybeUploadOnly hint (we will soon learn the truth) and removes the peer from the candidate count; clearing it may make the peer a candidate again.