Structural mechanism of signal transduction in a phytochrome histidine kinase