Habitat fragmentation, species diversity, extinction, and design of nature reserves