linecache: Display source code of TALES Expressions and add support for ipdb.

Signed-off-by: Julien Muchembled <jm@nexedi.com>
ZODB Components: Execute code in two steps: compile(), then 'exec' instead of only 'exec'.

This is much faster, eg defining a max function is about 39 times faster and
even more on more complicated code:

$ python -mtimeit -s 'code = "def max(a, b): return a > b and a or b"' 'exec code'
10000 loops, best of 3: 25.2 usec per loop
$ python -mtimeit -s 'code = compile("def max(a, b): return a > b and a or b", "<string>", "exec")' 'exec code'
1000000 loops, best of 3: 0.632 usec per loop

Another reason is for traceback/pdb readability as __file__ is displayed in
the backtrace, but with 'exec' __file__ equals to '<string>', compile() allows
to specify a readable name easily without having to override __file__.

Also, set __file__ to the Component relative URL instead of the ID for
readability sake.
ZODB Components: Cache source code in the loader to avoid access to ERP5 Site.

Using DeadlockDebugguer lead to a deadlock when trying to debug a deadlock on
ZODB Component as it was trying to load the Component. Moreover, this required
accessing to ERP5 Site whereas DeadlockDebugguer is used outside.

Steps to reproduce:
  1. Create an Extension Component with a sleep and run it.
  2. Call manage_debug_threads.
ClassTool: Removed in favor of ZODB Components.
linecache: Traceback could not be displayed if module_globals is None.
ZODB Components: Display proper traceback and source code if an error occurred on 'exec'.

The initial 'exec' traceback was not passed when raising ImportError (following
PEP-302), thus it displayed traceback in component_package instead of the actual
location of the error. Also, Caching source code retrieved from traceback/(i)pdb
(through get_source()) was done after the actual 'exec', whereas it should have
always been *before* obviously...

Steps to reproduce:
  1/ Create and validate a Test Component A importing another Component B.
  2/ Invalidate Component B or add a typo not handled by pylint (because of exceptions).
ZODB Components: Log error *and* traceback for both Extension and Document Components.
zExceptions: Monkey patch for Zope to display source code in Zope Exceptions tracebacks.