A framework for determining the fitness consequences of antipredator behavior