Diversity, function and potential applications of the root-associated endophytes