Switch from per-node std::vector to one big memory block for neighbors in C++

This pull request changes the memory layout of the C++ implementation.  Instead of per-node `std::vector`s of neighbors, each node contains an index and count for retrieving its neighbors from one big array.  This improves cache behavior.  On my machine it resulted in 15-20% speedup.  It should be easy to apply this optimization to many of the other languages too.

We could simplify the file-reading code if we relied on the file containing edges sorted by source node, but the previous implementation did not rely on that property, so this one does not either.