Fluctuation relations for heat exchange in the generalized Gibbs ensemble