MIT builds a programmable infrared chip that could shrink thermal cameras and improve gas detection and sensing.