Introduce avocado.loader module.

Introduce avocado.loader module with two different tasks
to perform: test discovery and test loading.

The test discover find tests (by ad hoc criteria) and return
a list of tests (test suite) to be loaded and then executed.

The test loader takes a test factory (a test class name and
parameters) and then load the test, creating a new test instance
ready to be executed.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
avocado.runner: remove load_test() and use avocado.loader module.

Remove the previous load_test() method (which performs discovery
and loading) and use the new avocado.loader module.

Rename run() method to run_suite().

Signed-off-by: Rudá Moura <rmoura@redhat.com>
avocado.job: Use avocado.loader module.

Use avocado.loader features and allows to extend the test loading
with a hook test_loader, for using inside a plugin.

Signed-off-by: Rudá Moura <rmoura@redhat.com>
Merge pull request #305 from ruda/test_discovery_and_load_phase1

Test discovery and load (Phase I)
avocado: Remove references to /var/tmp/avocado

This probably won't work for multi-users and/or
if /var/tmp/avocado exists before avocado is run
for the first time (with different permissions from
a different user). It's also probably a security
issue: a malicious user could create a /var/tmp/avocado
symlink pointing to /home/someone/important-dir.

This patch removes references to /var/tmp/avocado,
fixing this important security bug.

Recommended reading:

https://kurt.seifried.org/2012/03/14/creating-temporary-files-securely/
http://www.linuxsecurity.com/content/view/115462/151/

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>