No. The 9mm is not compatible with the .40 caliber frame/slide. On the other hand, you can put a .357 SIG barrel into a Glock 22 and use your .40 magazines.
Legally, no.
No, the Glock 22 barrel has an outside diameter that is larger than the hole in the front of the Glock 17 slide. your safest option is to buy a Glock 22 and a 9mm conversion barrel for the 22 slide. Then with the correct magazines you could use either 9mm or .40 S&W in a single frame and slide.
"Best" is a very subjective measure. Barrels by any major barrel manufacturer or by Glock would not be a poor choice.
no
No, only if you switch the entire slide. It can be used the other way around however. You can place a G19 barrel into a G32 pistol, and use 9mm, you would also have to use the G19 magazines.
Yes
Unfortunately, you can only convert a Glock 19 to .22 long rifle for cheap practice with a conversion slide and barrel, such as from Advantage Arms. Such kits are in extremely high demand and are very difficult to find. While the .40 s&w, the .356 sig, and 10mm auto glocks can be downconverted, you can't go "up" from a 9mm base model by swapping out a converstion barrel. Conversion barrels are available from compaines such as as Lone Wolf, Storm Lake, and Bar-Sto. .40 s&w, .356 sig, and 10mm glocks can be converted down to 9mm by swapping both the slide and the barrel. 9mm conversions also require 9mm magazines. .40 s&w and .356 sig can use the same magazines. One further complication is that "Generation 4" model parts won't work with "Generation 3" model parts. Know what Generation of Glock you have before you buy conversion parts that may not fit.
No. Some .40/.357 Sig pistols can be converted to fire 9mm simply by dropping in a 9mm barrel and using the 9mm magazines, though. Not sure about the Glock.
The standard magazine holds 15 rounds, although the larger 17 round magazines of the Glock 17 will fit in the pistol, as will the large 33 round Glock 18 magazines.
You cannot just swamp them out no.
yes
There are carbine conversion kits which use the lower receiver of the Glock pistol, and mate it to a carbine upper, yes.