Decoding ultrafast dynamics of solidification and residual stress evolution in additive manufacturing using high energy x-ray diffraction