pactest: use list form of accessors

In python3 these accessors return dynamic views and their iterX forms
were removed.  This incurs a penalty under python2 which immediately
builds and returns the full list, but is otherwise compatible.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
pactest: convert xrange to range

xrange was removed from python3.  This incurs a memory penalty under
python2 which builds and returns the entire list at once, but is
otherwise compatible.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
pactest: use tuples in list comprehensions

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
pmtest: manually read and execute test files

execfile was removed from python3.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
pactest: use int instead of octal literal

The syntax for octal literals was changed for python3.  In order to
maintain compatibility with python2, int() must be used to convert
a string to the appropriate octal.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
pactest: encode data before hashing

python3 requires unicode objects to be encoded prioer to hashing.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
pactest: use BytesIO instead of StringIO

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
pactest: fix shebangs

Only pactest.py is intended to be executed, so shebangs in the
libraries are unnecessary.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
configure: add python3 binaries to search

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>