The SCUBA-2 Cosmology Legacy Survey: Multiwavelength Counterparts to 10^3 Submillimeter Galaxies in the UKIDSS-UDS Field