Add node id -> node types bitmap
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 !8 (closed) work (in a separate diff).
Closes #1902 (closed).
Migrated from D1726 (view on Phabricator)