add to gen:queue
refactor bfs/generalized

- only need one visit fn
- by default, dont visit if vertex is already enqueued