Mali’s JNIM is seeking to apply lessons from Syria’s Islamist revolution in an offensive that is bringing it ever closer to power