miscellaneous improvments

add PriorityQueue implementation based on heapq, with some tests
fix some pep8 lint problems
documentation enhancements
put external links in a common weblinks.rst file