Global attractivity of the zero solution of a class of functional differential equations and its applications