Analysis and On/Off Lockdown Control for Time-Varying SIS Epidemics with a Shared Resource