By Ethan Baron From The Mercury News SAN JOSE, Calif.—A woman accused by Apple of stalking CEO Tim Cook for more than a year—emailing him photos of a loaded pistol and traveling across the U.S. to trespass at his home—agreed Tuesday in court to stay away from the tech chief, Apple employees and properties, and…