framework/core.py: Add pre_run and post_run hooks to TestProfile

These hooks no-op in the default TestProfile class, however they are
intended to give versatility and power to external test suites, which
may have specific environment requirements, setup requirements, or
teardown requirements, by allowing them to subclass TestProfile and set
these methods.
python: Add results_dir to TestProfile

This is needed specifically by XTS, but it might be useful for other
external suites that want to move files out of their runtime directories
into the saved directory. Specifically if those files are linked into
the summary.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
tests/xts.py: Add a tests file for the X Test suite.

This adds support for running XTS from piglit.

This patch was original written by Eric Anholt, but I've cleaned it up
and reworked parts of it for upstreaming, and as a result I've attached
my name as the author so ``git bisect'' and ``git blame'' will send
angry mail my way instead of Eric's.

v2: - Don't break dmesg reporting
    - Use str.format consistently
    - populate profile after check for xtest symlink

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>