You guys have it basically right. Bark beetles kill trees that are stressed, unless the beetles' population really takes off (an outbreak) and then they kill trees in any condition. It's the resin that chases out the beetles if they attack in low numbers; lot's of beetles (such as mountain pine beetle) overwhelm the defense. A successfully attacked tree has hundreds of "pitch tubes", blobs of resin mixed with sawdust where the adults pushed out the resin and sawdust from their tunnels. Adults tunnel in and lay eggs; the cycle is complete after a year when the new generation emerges, peppering the tree with thousands of exit holes. Some species (such as red turpentine beetles) can infest patches of bark and reproduce without killimg the tree. A tree usually has several species of bark beetles in it, in addition to associated insects that come along for the ride.
Bark beetles only feed on phloem (inner bark), and just score the surface of the sapwood. The same year they are killed, wood boring beetles (roundheaded borers, or long-horned beetle, and flat-headed borers, or metallic wood boring beetles) and wood decay fungi enter the tree. These other beetles, as larvae, feed on phloem at first, but then head into the wood. A couple months after bark beetlle attack, ambrosia beetles (shot-hole boreers) head into the sapwood, making very tiny width holes; they leave lot's of white, fine sawdust on the outside of the bark, because they bore in the wood, and there is no resin left because the tree is dead (although the foliage may still look green).
The stain is caused by fungi tha just break down the sugars in the sap. The trees will degrade fairly quickly, but not all at the same rate; a lot depends on the activity of the "associated" critters, not the bark beetles themselve. I have seen 18 in. ponderosa pine blow over 2 years after beetle kill due to termites and wood decay fungi! OTH, trees may stay relatively sound and up for several years. It seems to me that on drier sites, the beetle killed trees last longer; however, I've seen big western white pine in relatively moist forest stay sound for years, identifiable by their perfectly columnar white trunks, with the bark completely off.
When beetle kill is salvaged, if the log stays together, it goes on the truck (for pulp). The relatively new market for stained sawn lumber probably comes from trees felled in the same year that they are killed, so that wood decay and large diameter tunnels from wood boring beetles hasn't occurred yet. Unlike timber salvaged from a fire, I would say that after 2 years, forget about it--it isn't any good for dimension lumber, decorative or not. The test is in bucking up the tree.
Some species:
Mountain pine beetle (Dendroctonus ponderosae): ponderosa pine and jeffery (small trees), lodgepole, western white, whitebark, sugar
Western pine beetle (Dendroctonus brevicomis): ponderosa, jeffery pine (large trees)
Spruce beetle (Dendroctonus rufipennis): Engleman spruce, black spruce
Southern pine beetle (Dendroctonus frontalis): Longleaf pine, Shortleaf, Slash, Loblolly
Douglas-fir beetle (Dendroctonus pseudotsugae): Douglas-fir
Fir engraver (Scolytus ventralis): Grand fir
Basically, every conifer has one or more bark beetles that kill them. Cedars, Sequoias, and Hemlocks rarely are killed by bark beetles.