Optimal Network Decontamination with Threshold Immunity