As populations rebound, attacks on livestock and humans are fueling debate over the limits of coexistence