FlexHDR: Modeling Alignment and Exposure Uncertainties for Flexible HDR Imaging