A model for the dynamics of a separation bubble used to analyze control-surface buzz and dynamic stall