Inverse-Optimal Input-to-State Stabilizing Control for Hybrid Systems