Dispersal among habitats varying in fitness: reciprocating migration through ideal habitat selection