Mark std.string.lastIndoxOf as @safe pure

This pull request marks the first two definitions of `lastIndexOf` as safe pure and marks the last two definitions as pure.
They only accept built-in string types.

The reason why the last two definitions are marked as only pure is that they use `std.conv.to` which is unsafe for string to string conversion.