Trapping and Cooling of Single Atoms in an Optical Microcavity by a Magic-Wavelength Dipole Trap