Live where you thrive: Joint evolution of habitat choice and local adaptation facilitates specializaton and promotes diversity