Stability of Hybrid and Discontinuous Dynamical Systems