An outlawed Nigerian Shia group aligned with Iran killed two police officers in what authorities say was an unprovoked attack.