[RFC] Add `feedkeys` API function part 2

Cleaning up after #916

- I've split the f_feedkeys() function from eval.c into a reusable feedkeys()
- Now the API vim_feedkeys should work just like the vimscript feedkeys(String keys, String mode)
- Added new vim_remote_send(String) API for compatibility w/ Vim --remote-send

Just from input arguments to `replace_termcodes`: An empty string could be the result of removing only `CTRL_V` or `\\`, if `str` only contains these keys. Seems like the only way that `ptr` is an empty string (if `str` is not empty). Does not look like an error.