X-ray study of ice and water on surfaces and in aqueous solutions