In the midst of exploring a sale, Magenta Therapeutics Inc. is laying off the vast majority of its staff, including five executives.