If the codegen mode is CodegenMode::Exported, the codegen should not
generate code including any non-exported flags. This change add a
function to filter the parsed flags before feeding to codegen.
Test: atest aconfig.test aconfig.test.java AconfigJavaHostTest
aconfig.test.cpp aconfig.test.cpp.test_mode aconfig.prod_mode.test.rust
Bug: 311152500
Change-Id: Ia88795bbd13774d02c76d8ab7ef20868149599b5