Hundreds of migrants stranded at an abandoned camp in Bosnia and Herzegovina were spending New Year’s Eve in freezing temperatures, according to humanitarian groups, as authorities in the country struggled to balance their safety with growing hostility from local populations.