client.shared.backports: Introduce json module from 2.7

In order to make the autotest client run safely on
python 2.4 systems, introduce the json module from
python 2.7. It's a safer choice than using simpler
approaches to dumping and restoring a json file.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared: Introduce jsontemplate

Our plan is to create a machine consumable file with
relevant summary data of an autotest client job. JSON
is the format of choice for many applications, due to
its simplicity and human readability.

jsontemplate is a simple templating engine that can
help render a nicely, human readable report of the
job data by using the JSON file. Its author, Andy
Chu, graciously agreed with double licensing this
file under both the Apache license version 2 (original
license) and the GPL version 2 (autotest's license).
The reason why it has to be done is that both licenses
have incompatibilities.

CC: Andy Chu <andychup@gmail.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared: Introduce the templates subdir

Our client/tools/html_report.py script gets the job
done, but it is fairly brittle, assembling HTML line
by line. In order to move away from this model, ship
template and auxiliary css and javascript files, that
will be used to assemble the report, more elegantly.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.base_job: Expose the job status mapping

In order to avoid having multiple, possibly incompatible
job status mapping dicts, expose the mapping present on
base_job. This mapping converts from autotest status
codes to a boolean of whether the operation passed or
not.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared: Introduce a reporting library

Introduce a library specialized in client job reporting
that can:

 * Parse the autotest job 'status' file, using the infra
structure present on client.shared.base_job and create
a json data structure that will be dumped at the same
level of the status file
 * Generate and write an HTML report, pretty similar in
design and structure to the one currently produced by
client/tools/html_report.py.

It sports a more structured and clean approach at
creating these reports, which will help the maintainability
of the code base, and it also opens possibilities, such
as also creating HTML scheduler emails, as well as
output to other formats.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.job: Use the new report library

Replace the HTML report generation stage with the new
report library API.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Delete client/tools/html_report.py

Remove this implementation of HTML reports creation, as
it's been replaced by client.shared.report interfaces.

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