Nanotribology of Confined Water by Quasistatic Computer Simulations: Effect of Impurities