Democratic app built by secretive tech firm Shadow Inc. comes under scrutiny after epic 'nightmare' in Iowa