fix _lookup_section returning incorrect name

* move Option value setting logic out of Parser and into Option class set() method
* remove conditional operator in multiple places for better backward
  compatibility
* add some runtime checking for recurring options