Replace inherit_option_id by a selection field

Build on #228, replaces inherit_option_id by a 3-state selection:
* always applied
* optional, currently enabled
* optional, currently disabled

Some of #228's changes are mixed in this one