in priority queue: use generator in __contains__(), add __len__()