refactor `select` impl for TripleGraph, add `get-node-for-id` to PNode proto
remove obsolete node check in TripleGraph/select impl