Taiwan's HTC said that it will sell part of its unit for XR headsets and glasses to Google and transfer some of its employees to the U.S. company.