Dual-purpose drilling and tapping machine