Nigeria has long grappled with insecurity, from mass kidnappings for ransom to banditry and militant attacks.