Tree: allow numeric ids (instead of string ids) in set("path", ...).
Fixes #18279.
Added generic datatype switching for id datatype of test data.
Path tests are duplicated for id datatypes string, int and float respectively.