Certifying Ensembles: A General Certification Theory with S-Lipschitzness