py3: Replace map/filter with a list comprehension

The map and filter functions returns a list in python 2 but
an iterator in python 3. However, there are instances where
the code assumes the returned value from map/value to be a
list. Substitute these functions to its list comprehension
equivalent expression to enable compatibility with Python 3.

Change-Id: Iccaa3d1f4b009f59ea575c955ee4015e964f2318
12 files changed