Implements CALastMix.
References CAQueue::add(), CALastMixBChannelList::add(), add64(), CAChain::addChannel(), CAChain::addDataToUpstreamQueue(), CAChain::addToSocketGroup(), CHAINFLAG_FAST_RESPONSE, CHAINFLAG_LENGTH_MASK, CHAINFLAG_NEW_CHAIN, CHAINFLAG_STREAM_CLOSED, t_sequel_upstream_chain_cell::chainId, t_MixPacket::channel, CHANNEL_CLOSE, CHANNEL_DATA, CHANNEL_DUMMY, CHANNEL_OPEN, CAMuxSocket::close(), CASocket::close(), CAChain::closeUpstream(), CASocket::connect(), CASocket::create(), CAChainTable::createEntry(), t_MixPacket::data, t_first_upstream_chain_cell::data, t_sequel_upstream_chain_cell::data, DATA_SIZE, CAASymCipher::decrypt(), CAChainTable::deleteEntry(), E_SUCCESS, E_UNKNOWN, t_upstream_chain_cell::firstCell, t_MixPacket::flags, CACacheLoadBalancing::get(), CALastMixBChannelList::get(), CAQueue::get(), CAChain::getChainId(), getcurrentTimeMicros(), CACacheLoadBalancing::getElementCount(), CAChainTable::getEntry(), CAChainTable::getFirstEntry(), CASocketGroupEpoll::getFirstSignaledSocketData(), CAChainTable::getNextEntry(), CASocketGroupEpoll::getNextSignaledSocketData(), getRandom(), CAQueue::getSize(), CAChainTable::getSize(), CADatabase::insert(), CAChain::isSignaledInSocketGroup(), CAThread::join(), KEY_SIZE, LAST_MIX_TO_PROXY_CONNECT_TIMEOUT, LAST_MIX_TO_PROXY_SEND_TIMEOUT, lengthAndFlags, t_upstream_chain_cell::lengthAndFlags, CALastMix::lm_loopLog, LOG_ENCRYPTED, CALastMix::m_bRestart, CALastMix::m_bRunLog, CALastMix::m_logDownloadedBytes, CALastMix::m_logDownloadedPackets, CALastMix::m_logUploadedBytes, CALastMix::m_logUploadedPackets, CALastMix::m_pCacheLB, m_pChainTable, m_pChannelTable, CALastMix::m_pMuxIn, CAMix::m_pMuxInControlChannelDispatcher, CALastMix::m_pQueueReadFromMix, CALastMix::m_pQueueSendToMix, CAMixWithReplayDB::m_pReplayDB, CALastMix::m_pRSA, CALastMix::m_pSocksLB, CALastMix::m_pthreadReadFromMix, CALastMix::m_pthreadSendToMix, MAX_FIRST_UPSTREAM_CHAINCELL_PAYLOAD, MAX_MIXIN_SEND_QUEUE_SIZE, MAX_POLLFD, MAX_SEQUEL_UPSTREAM_CHAINCELL_PAYLOAD, MIX_PAYLOAD_SOCKS, MIXPACKET_SIZE, msSleep(), t_queue_entry::packet, CAMsg::printMsg(), CAControlChannelDispatcher::proccessMixPacket(), CAChain::processDownstream(), RSA_SIZE, CASocketGroupEpoll::select(), CASocket::sendTimeOut(), CAChain::sendUpstreamData(), t_upstream_chain_cell::sequelCell, set64(), CASymCipher::setKey(), CAThread::setMainLoop(), CASocket::setNonBlocking(), CASocket::setRecvBuff(), CASocket::setSendBuff(), CAChain::setSocket(), setZero64(), CAChain::signalConnectionError(), CAChain::signalUnknownChain(), SOCKET_ERROR, CAThread::start(), and t_first_upstream_chain_cell::type.