Resonance interaction energy between two entangled atoms in a photonic bandgap environment