Add node id -> node type bitmap to effectively run edge restriction
during graph traversals.
This is still WIP because I am waiting on full scale test results. Also, this
diff is only about *loading/storing* the bitmap, not using it, because it needs
to be merged with recent D1700 work (in a separate diff).
Closes T1902.