Geometric Phase in a Cavity QED with Cold Atoms Trapped in a Double-Well Potential