Improved C++ symbol indexing support.

It's still not perfect, but it handles most code quite well.