As residents perish, nursing homes fight for protection from lawsuits