Dynamic x-ray optics with microfluidics: stabilization of gas bubbles by surface ordering and freezing