[WIP/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.
I refactored all the logic that I could, but the result does not strike me as much more elegant. It is very intertwined, unfortunately.