Nearly 20 officials in Beijing were held accountable or sacked for poor management of the Covid outbreak.