Refactor node visibility checks

passes ``make check`` and my integration tests. More efficient and easier for me to work with in pgsnapshot