Replace three more dict.keys/items occurrences

It's easy to forget that these calls produce lists in Python 2, but 2to3 makes
it very clear by converting e.g. dict.keys() to list(dict.keys()). If we don't
need an actual list (and we rarely do), may as well just use iterators.

In tests/bench.py, we can obtain the first 10 keys with itertools.islice.
Use __future__.print_function import

This is valid in Python 2.6, and reduces some of the code churn that occurs
with 2to3 conversion.

Also replace the old "except Exception, e" syntax.
Use another open() call as a context manager
fasta.py: change seen_headers into a set

It was previously a dict that mapped each header to None, and was only used
for membership testing. This is what sets are for.