Move templates lookup into a module constant.

Templates lookup object is now assigned outside :func:`render_template`
(referred as :data:`TEMPLATES`), and its value built from module's path
instead of Python interpreter current working directory
(:data:`TEMPLATES_PATH`). Also, use :meth:`mako.TemplateLookup.get_template`
for retrieving template object, which allows setting templates' path
with a symbolic link into its path.
These changes should let templates rendering
more installation independent, as perhaps slightly faster.
Make web application a full WSGI one (to be continued).

The :func:`dispatcher` is now the single entry point to the application,
thanks setting new items in WSGI environ:

*   ``environ['philologic.db_name']``, which stores database name,
*   ``environ['philologic.db_path']``, which stores database path on filesystem,
*   ``environ['philologic.assets_prefixurl']``, which stores a URL prefix
    for assets (JS, CSS, images) to be append after hostname,
    allowing them to be served by webserver through a specific path,
    potentially shared between several instances of web app.

.. warning:: Partial work!

    These changes do not include ``www/js/philologic.js`` and ``python/examples``,
    which have to be modified too (in a future commit).

These additional values are passed through Mako templates contexts,
and so impact several functions signatures, as their potentially must be passed
at each call between dispatcher and appropriate template.

Conflicts:
	www/functions/get_text.py
	www/reports/concordance.py
	www/reports/kwic.py
	www/reports/navigation.py
	www/reports/relevance.py
	www/templates/header.mako
	www/templates/object.mako
	www/templates/pages.mako
Move WSGI app. file example from old dir. to ``/scripts``.
Fix arguments to :func:`dispatcher.setdefault_environ` in scripts and reports tests.

Previously, :func:`dispatcher.setdefault_environ` was called with only one argument,
``os.environ``, but this function only accepts at least three arguments.
Adapt all scripts called by JS to follow WSGI.

Move all Python scripts called by (AJAX) JavaScript ``philologic.js`` bodies,
previously inside a ``if __name__ == "__main__":``,
inside new functions with :data:`environ` and :data:`start_response` arguments,
allowing their calls by :func:`dispatcher`.
These functions no more print result on standart output, but instead, following WSGI,
initiate their HTTP responses with a call to :data:`start_response`, and return
their results (as HTTP responses bodies).
All these new functions are imported as is in their parent module.

Selection of which script should be executed is now set by new ``script`` CGI field.

Previous :data:`path_name` and :data:`db_path`, set in head of ``philologic.js``
are no more required, and replaced by new :data:`app_path`, which should point to
WSGI application URL.
Also, a new :data:`my_parentpath` variable is introduced, which should point to
parent location of ``philologic.js`` script, retrieved through script ``src`` attribute,
thanks to new id ``#philologicjs`` set to this node,
which allows call to ``ajax-loader.gif``.

Conflicts:
	www/js/philologic.js
Fix typo for assets URL name variable in search boxes template.