Chemical and Electronic Structure of Surfaces and Interfaces in Cadmium Telluride Based Photovoltaic Devices