A versatile Kelvin probe for dynamic work function change measurements during gas adsorption and in situ film growth experiments