To be consistent with CLI, nix API and many other references. As part of this, we also converted it to a scoped enum. https://github.com/NixOS/nix/issues/8876
The code accidentally conflated `std::string::size_type` and `long unsigned int`. This was fine on 64bits machines where they are apparently the same in practice, but not on 32bits. Fix that by using `std::string::size_type` everywhere.
RewritingSink
Giving it the same semantics as `rewriteStrings`. Also add some tests for it