The space agency lost touch with the beloved spacecraft following a faulty command signal. Here\u2019s how it happened\u2014and how engineers worked to bring it back.