X-ray and resistance studies of the melting and freezing phase transitions for gallium in an opal