Testor's wood glue is an acetate-based product designed primarily for balsa wood, as used by the flying airplane model fraternity. The primary virtue of both balsa wood and the glue is light weight - hardly a prime concern among scale ship modelers. Balsa is about the most useless substance I can think of for scale ship modeling. I imagine the glue works on other species of wood, but there are plenty of better adhesives for ship modeling.
I find that the "yellow" or "cream-colored" adhesives, sold by Franklin under the name "Titebond" and by Borden under the name "Elmer's Carpenter's Glue," are the most useful general-purpose adhesives for wood and other porous materials. They stick very well (a joint made with that sort of adhesive should be stronger than the wood itself), clean up (when wet) with water, and can be trimmed, planed, sanded, etc. without damaging tools. Old-fashioned white "Elmer's Glue" is also a very good adhesive. It shrinks a little as it dries, and dries clear. I use it a great deal for rigging. When applied to knots and other rope work it has the disadvantage of being shiny, but that can be cured with clear flat finish or, in some cases, paint.
Yards aren't glued to masts. The yard has to be able to swing in a horizontal arc and (except for the lower yard on each mast) to slide vertically up and down the mast when the sails are being set, furled, and reefed. The methods of securing the yards to the masts have varied a bit over the centuries, but the basic principles are the same.
In the eighteenth century the lower yards were secured to the masts by rope tackles called "trusses." The truss was, essentially, a simple strap that could be slacked off by means of a block-and-tackle arrangement, so the wind could blow the yard a little bit away from the mast. That came in handy when the ship was working to windward; easing off on the truss tackle let the yard swing a little more without getting fouled in the lower shrouds.
The topsail, topgallant, and (if the ship had them) royal yards were secured by means of a gadget called a parrel. It consisted of two or three ropes running through wood balls called parrel trucks, which were separated from each other by boards with holes drilled through them called parrel ribs. The whole assembly was actually pretty simple, but it's kind of hard to describe in writing. It functioned like a crude ball bearing mechanism, letting the braces swing the yard and the halyard raise and lower it.
Sounds like you could use a good book on rigging. Two I can recommend are Eighteenth-Century Rigs and Rigging, by Karl Heinz Marquart (I fear I may have spelled his name wrong) and The Masting and Rigging of English Warships, by James Lees. Both have nice drawings that will clarify all this stuff - which probably is a bit confusing in the absence of illustrations. Unfortunately both books are expensive, but used copies are available and good libraries should have them.
If you don't want to take on the job of rigging the trusses and parrels, I'd suggest securing the yards to the masts with simple loops of thread. There's no need to fasten the yard to the mast rigidly. The basic components of the running rigging will align the yard the way you want it.
Incidentally, I recently discovered a terrific tool to help with the alignment of masts and yards. Sears sells, for about $35.00, a gadget that's designed to project a red laser beam on walls, floors, etc. You can set this thing up to project a vertical line down the centerline of your model. When the red line hits the full length of the mast, the mast is vertical. Then you can rotate the nozzle (or whatever it's called) of the gadget 90 degrees and use it to align the yards. It's also great for marking waterlines.
Hope some of this helps a little. Good luck.