Introduce a Settings singleton

Instead of manually specifying names of the options and casting the
types, we use some macros to generate the C++ class and call it from
the app.