Refactor mechanism for setting global compile options/program header

Replaced set_program_options/set_program_header functions with
push_compile_options/pop_compile_options and
push_program_header/pop_program_header.

Allows to roll-back to default or previously set options/header.