Authorities in Nigeria say all hostages have now been released in what was one of largest mass kidnappings in the country's history.