[RFC] Fix vim_strchr() duplication

Replacing duplicated code at the tail end of vim_strchr() and adds nonnull arg function attributes on vim_strchr and vim_strbyte

https://github.com/neovim/neovim/issues/1474