avoptions: Add an av_opt_flag_is_set function for inspecting flag fields