Nigerian troops rescued 178 people from Boko Haram in attacks that destroyed several camps of the extremists in the northeast of the country, an army statement said.