Tesla signs three-year deal with Panasonic for Nevada factory