Replace some uses of map with list comprehensions.

This is a little tweak for better cross-compatibility with
the same code under Python 2 (where map gives a list) and
Python 3 (where map gives an iterator).
Add missing copyright & license text to many unit tests