US representative Colin Allred is ahead of US senator Ted Cruz by a narrow margin, which is a notable twist in the electoral landscape of Texas.