list command: several fixes + documentation

  * duplicate strings when filling the bencode structure
  * limit the number of results to avoid going over the UDP packet
    size limit