Good try, but you used the wrong sugar.
Ordinary table sugar is “granulated,” meaning that it consists of individual granules or grains, each of which is a single crystal of pure sucrose. But when pulverized into a fine powder, sugar tends to pick up moisture from the air and cake. (Techspeak: sugar is hygroscopic.)
To prevent this, the manufacturers of powdered sugar add about 3 percent of cornstarch. It’s the starch that gummed up your tea, because it won’t dissolve in cold water.
What you should have used is superfine or ultrafine sugar, which is not a powder in the strict sense. It consists of tinier crystals than those in ordinary granulated sugar, and it therefore dissolves more easily.
It’s used by bartenders because it dissolves quickly in cold mixed drinks and by bakers (it’s sometimes called baker’s sugar) because it blends and melts faster than ordinary granulated sugar.