Greatest common divider: iterative version