As more people move to cities, careful planning could mean a happy home for both humans and a substantial amount of wildlife. David Biello reports