[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.
Is it possible for this to happen? I may be missing something, but seems like if this condition were to hit, the one from the previous section would also have happened and we would have returned already.