refactor main.py, flesh out functions from main function

@stdweird, @wpoely86: please review?

The diff is going to look a bit messy, maybe you want to look at the actual new `main.py` instead...
Splitting of the build options that have a cmdline equivalent let to a significant cleanup, now the names of those build options are only listed when defining `BUILD_OPTIONS_CMDLINE`, not anymore in `init_build_options`, which is a massive improvement.
I'm not in favour of generating the definition of `DEFAULT_BUILD_OPTIONS` just to make two lines in this module slightly shorter by not having to refer to `BUILD_OPTIONS_OTHER`...