[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.
Copying and pasting code is also an anti pattern. If a line needs to change in the above loop, it likely has to change here, too. If you can, please try to find a way to factor this into a reusable function.