Evolution of behavioural resistance in host–pathogen systems