The effects of foraging behaviour on food-web structure and dynamics