Animal diversity and ecosystem functioning in dynamic food webs