Width, structure and stability of sheaths in metal plasma immersion ion implantation and deposition: measurements and analytical considerations