Optimize IndexGenerator::AddPrim() funcs for MSVC.

Reduces profile from ~5.4% to ~1.6% (with vertex cache off) in
Senjou no Valkyria 3.  Similar to the TranslatePrim() funcs.
Merge pull request #4454 from unknownbrackets/perf

Optimize IndexGenerator::AddPrim() funcs for MSVC