Consumer-resource matching in a food chain when both predators and prey are free to move