Safe Control and Learning Using Generalized Action Governor