A shooting at a supermarket in the US state of Texas that left 20 dead is being investigated as domestic terrorism, officials say.