High-resolution CCD spectra of stars in globular clusters. VII : Abundances of 16 elements in 47 Tuc, M4, and M22