Make the benchmarks more comparable:
- Store the QDir::Filters in one central var, this way it's the same in
all the call sites
- Add a `bool forceStat`, when true force calling stat(), either
explicitly in posix_helper(), or implicitly in Qt classes by e.g.
calling a QFileInfo method that would have to call system stat()
internally. Otherwise benchmarking readdir()/dirent showed bigger
times, which was mostly due to the explicit stat() calls, whereas we
can use dirent::d_type (on the platforms where it's available)
Drive by change: for std::filesystem::recursive_directory_iterator, set
skip_permission_denied option and use the non-throwing constructor.
Change-Id: Icf138a5dc41d32741c1be611d664b01008b2f3fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>