NEW YORK — A city reeling from a recent spate of violence prepared to lay to rest a rookie police officer being hailed as an inspiration to his immigrant community, as investigators sought to make sense of a domestic dispute that left another officer “fighting for his life.”