Chemically controlled megasonic cleaning of patterned structures using solutions with dissolved gas and surfactant