RMT really hit it on the head with suggestions. As (almost) always, ignore jimatbeyond.
There's not a perfect number, but keeping the stem in the 50-70mm range will probably make more sense than the 80-100 range. Yes, even if it's an XC bike. I think you have the right idea overall from reading through this thread. Regarding the stem length vs. bar width, 100mm width = 10mm on the stem is not the number most people work with. 2:1 (20mm width increase equals 10mm stem decrease) is a much more popular figure. It's not perfect, but it's probably a bit closer than the 10:1 suggestion. Stems are cheap, so experiment. It seems most people would rather have their reach in the frame and not the stem.
One thing not talked about much with finding a mountain bike is finding a bike that helps you with your weak areas. Do you pass people on the climbs and then have people on your tail while descending? Maybe a bike with a touch more travel, wider tries, slacker head angle, longer wheelbase or *gasp* a dropper post may help your
overall speed. It took me a long time to realize I was faster on a 30lb bike with 5" on each end than my 21lb hardtail with 100mm on the front. For some with more handling than horsepower, the smaller wheelbase, quicker handling, lighter weight argument would make more sense.
Get on as many bikes as possible. 5 seconds on Google shows mountain bike demos from all sorts of brands. "xxxx demo days" can find things like
Giant,
Trek, and
Specialized events all over the country.
In the end, nobody can really tell you what
you prefer though.