On stability, L 2 -gain and H ∞ control for switched systems I