(#16581) Refactor code for converting string and binary sids
This commit moves the methods that were previously part of the security
module into a sid module, and adds tests that only execute on windows due
to its reliance on the win32/security gem.