(#16581) Refactor code for sid validation
Previously, the windows file provider knew too much about how to validate
a sid, e.g. catching a specific windows-specific exception.
This commit moves that logic into a valid_sid? method and updates the
file provider to call it. In doing so, the logic for string_to_sid_ptr
is simplier, in that it always expects a block.
It also removes tests that were refactored into sid_spec.rb in an earlier
commit.