Mark std.string.chop and its unittest as @safe and pure

I do not mark one of the unittest as safe and pure because it uses `core.stdc.stdio.printf`.