Outbreak analysis of an SIS epidemic model with rewiring