Changed some thread related stuff in TorrentServer and added timeout to TorrentSocket
trivially optimized ThreadedSocket