New York and Illinois joined California on Friday in ordering nearly all residents to stay in their homes, as governors undertook their most sweeping efforts yet to contain the coronavirus and fend off the kind of onslaught that has caused southern Europe to buckle.