[RFC] Clean up and split 2-step antipattern in set_char_option()

A lot of small changes in the set_char_option() function in option.c (for compliance with the neovim style guide), and the split of the 2-step loop as discussed in issue #572.

There is a lot of commits that might be needless in history. I would like an external opinion on how to squash them. Further refactoring suggestions appreciated as well.
It might be clearer if you make a `bool valid` and set that when you do the `break` above. Then you can contain `i` in the `for` loop and it will be clearer here why we are returning an error.