Resolve hostames for peers as a component

Some implementation of a long awaited feature:
http://dev.deluge-torrent.org/ticket/1896

  * resolves hostname for each peer in separate thread, asynchronously
  * retries a few times if resoving failed
  * keeps all hostnames cached globally
  * number of entries in cache is limited