Templated mask checks and generic NUM_TREES Fix leaking leaves
Happy new year to the wonderful Godot community!
Also moved MT physics server wrappers to the main servers folder, since they don't have to be implementation specific.