Entanglement and coherence in photoionization of H2 by an ultrashort XUV laser pulse