sso: Verify glActiveShaderProgram with invalid program parameter

There are several cases outlined in the GL 4.4 spec where
glActiveShaderProgram should generate specific errors.  In addition,
section 2.3.1 (Errors) says:

    "Currently, when an error flag is set, results of GL operation are
    undefined only if an OUT_OF_MEMORY error has occurred. In other
    cases, there are no side effects unless otherwise noted; the command
    which generates the error is ignored so that it has no effect on GL
    state or framebuffer contents."

After calling glActiveShaderProgram with an invalid parameter, verify
that the active program state has not been modified.

v2: Fix a couple typos in comments.  Restore expected active shader
binding after failing subtests.  Suggested by Jordan.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
python: Convert from print statement to function

One of the biggest changes between python2 and python3 is that print
changed from a statement to a function. This change was backported to
python2 in the __future__ module, and this patch makes that conversation
to ease the transition from python2 to python3.

This patch does add a dictionary comprehension to
Summary.generate_text(), but dictionary comprehensions are available in
python3, and is fixed in the next patch.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
tests: replace tabs with spaces

This is achieved with the following command:
find tests -name '*.py' | xargs sed -i -e 's!\t!        !g'

In python2 its a warning to mix spaces and tabs, in python3 it's a
runtime error. So no more tabs in python files, just spaces.
Convert from python2 to python3

This is one big ugly patch, but I don't really see a way to make a
working transition without this ugliness, since any splitting of these
changes would cause the framework to raise a runtime exception.

This is the output of the 2to3 tool provided by python, with a few
manual edits for style and to replace list(iterator) with plain
iterators, which are fine for our use

It also does the following:
- replace #!/usr/bin/python with #!/usr/bin/python3
- Fix changes to hanging indents
- fix slots operator in status.py:
  - In python3 __slots__ behaves slightly differently than in python2,
    in that a class attribute does not fulfill a slot, but actually
    conflicts with it. For more information see:
    http://bugs.python.org/issue12766
- Fix bytes, strings and unicode
  - In python2 regex strings are usually of the raw type: r'(foo|bar)',
    but in python3 they need to be of the same type as the strings they
    are to be applied to. In dmesg this is bytes, so b'(foo|bar)'
  - One of the huge advantages to moving to python3 is that there is no
    ambiguity between unicode and byte strings. Bytes are explicitly
    marked as such and everything else is unicode.
- Fix functions that have moved from modules or been renamed
  - A number of types have been moved into the global namespace in
    python3, among them types.IntType and types.LongType have been
    replaced with int and types.FloatType have been replaced with float.

What it doesn't fix:
- junit
generated_tests: Convert to python3

This uses python3 for generating tests. This was generated by the 2to3
tool, with a few hand tuned changes, mainly around print statements that
already used grouping parens.
CMakeLists: Change python 2 dependency to python 3