Replace path-based stack frame exclusion
Replace path-based stack frame exclusion

Prior to this commit, the HIDE_IN_STACKTRACES setting was implemented by
importing the modules listed in the setting and recording their file
system paths.  Then tidy_stacktrace() and
_StackRecorder.get_stack_trace() would look up the file system path for
each frame's code object and compare that path against the paths for the
excluded modules to see if it matched.  If so, the frame would be
excluded.

This was inefficient since it used a file system access,
os.path.realpath(), for each frame (although the _StackRecorder
implementation included some caching to reduce the cost).  It also would
not work correctly for namespace packages since they can have multiple
file system hierarchies.

Replace with a new implementation that instead retrieves the __name__
variable from the frame's f_globals attribute and matches that module
name against the list of excluded modules directly.

tim-schilling/django-debug-toolbar,spookylukey/django-debug-toolbar,tim-schilling/django-debug-toolbar,tim-schilling/django-debug-toolbar,jazzband/django-debug-toolbar,spookylukey/django-debug-toolbar,jazzband/django-debug-toolbar,jazzband/django-debug-toolbar,spookylukey/django-debug-toolbar