A perfect storm of coding mishaps and human errors hamstrung Shadow’s operations at the Iowa caucus, delaying results in the first-in-the-nation contest and raising urgent questions about the often-invisible technology that powers American democracy.