Recoil implantation from a thin source: II. Extension to the problems of recoil sputtering and of moderately thick sources