Sometimes yes, but not always.
Sometimes. The firing pin and extractor may leave marks on an ejected shell that can be matched to a gun.
When the gun is fired the shell casing is ejected by the blow-back gas and the next bullet is automatically loaded. All in one motion. The next bullet is now ready to fire.
Sometimes you can.
"They could match extractor marks on the shell, yes." If they don't have the gun and it's registered: Highly unlikely, unless it being registered they also get a spent shell casing with the extractor marks and firing pin indent on the firing cap. Also, if you don't "police" your brass, they have the shell casings at the scene, where there is likely a casing with your finger prints (loading the firearm) and possibly DNA (sweat or blood on the casing). Realistically though, if it's a standard shotgun, smooth bore barrel, and you shoot rifled slugs or buckshot and leave no evidence of the shell casings behind, they would have a hard time matching it to just the projectile part of it.
Gun Powder, a shell casing (usually cardboard, cotton, and other various paper products) and an element, when burned, gives off a specific color.
Yes.
All Bolt action rifles work the same. When you fire you have to manually operate the Bolt to eject the shell casing and load the next shot. This must be done for each shot until the rifle is empty. In the case of Air soft there is no Shell casing, but it's the same action to load and fire.
To help keep foreign matter (dirt) out of the action when the weapon is not firing.
They didn't. Modern cartridges or "bullets" still contain gunpowder inside the shell casing. The first gun powder integrated cartridge was invented in 1808, but it didn't really catch on until around the time of the American Civil War.
There is a part almost all guns called the extractor that, like its name implies, extracts the shell when the bolt of the gun recoils back.
Depending on what you mean by "trace", the answer could be yes or no.
Your question is ambiguous, assuming by capsule you mean the shell casing then this is also not the case in every weapon. Shell casings are ejected when the weapon is fired if it is an automatic or semi-automatic weapon. Revolvers, for instance, do not eject the spent cartridges.