Nigeria’s military has released an editor two days after detaining him over an article about a planned offensive against Islamist militants in the northeast, his newspaper said.