* refactor: use std::string in tr_watchdir_inotify_on_event()
* refactor: add template tr_variantFromBuf() variant
if it has .data() and .size() it is good
* test: fuzz test tr_torrent_metainfo.parseBenc()
* fix: better error-checking in benc string parsing
* fix: return benc failure if the parse stack is unbalanced
* fix: stack range error when logging json parse errors
* test: fuzz test tr_variantFromBuf()
* refactor: add SAX-like benc parser
This is the first part of a series of PRs whose end goal is to avoid
the overhead of tr_variant when parsing bencoded data, e.g. when
parsing .torrent files on startup or when parsing announce/scrape
tracker responses.
This PR introduces a SAX-like benc parser, reimplements variant-benc
to use the SAX benc parser (so that we don't have two benc parsers),
and updates the benc + variant tests.
* refactor: use std::string_view to parse benc
* refactor: simplify private parsing API in variant.cc
* chore: remove unneeded includes
* refactor: merge tr_variantFromBenc and tr_variantFromBencFull
* refactor: keep torrent hash in std::array<char,20>
This replaces the hashString QString allocation with a compile-time
array that's included in sizeof the Torrent struct that owns it.