This will allow for more control over which ID should actually be marked
as unused/to be deleted.
Also some general minor cleanups and refactor, most notably:
* Add a constructor to internal `UnusedIDsData` struct, which can
directly use the public `LibQueryUnusedIDsData` parameters struct.
* Add default values to trivial data in `LibQueryUnusedIDsData`.
No expected behavioral changes in this commit.
This data was 'hidden' away in a util in
`lib_query.cc`, which made it hard to discover and keep up-to-date.
However, as shown by e.g. #108407, critical low-level features in ID
management code, such as remapping, now rely on this information being
valid.
Also simplify `BKE_library_id_can_use_filter_id` and
`BKE_library_id_can_use_idtype` to make them more generic, relying on
IDTypeInfo to retrieve IDtype-specific info.
No behavioral changes expected here.
Add a new `BKE_lib_query_unused_ids_amounts` to query expected amounts
of deleted IDs. This function does not tag IDs in main anymore.
Factorize most parameters (and output data) into a new struct
`LibQueryUnusedIDsData`.
Part of PR https://projects.blender.org/blender/blender/pulls/117304.