Notify user when a search request is pending in the background.

If a request takes a long time then there was no indication that
something was still going on in the background or that the currently
displayed results do not match the contents of the search box.
(Mostly) fix non-root installs of DXR.
Fix a template syntax error.
Don't accidentally disable all plugins when the config file omits the enabled_plugins directive.
WSGI: grab DXR_FOLDER from os.environ if not specified in WSGI environ

This makes it easier to pass it in in some cases (e.g. stackato)
Fix problem with extents from UnionFilter.

The calling code expects this to return results sorted and unique and
the previous code did not guarantee either.  This would result in
strange results in the search highlighting such as missing entries
or lines that got portions displayed more than once.
Fix UnionFilter being too liberal with the 'OR's.

Previous behavior was to combine all conditions with OR.  In the case
of a query like "type:Foo type:Bar", this found all types matching
either Foo or Bar.  This is in contrast to all other searches that
would would instead first find a list of files matching all terms
and then display all lines within those files matching any term.

This should make type: behave like function: and var:
Tweak some comments.
Fix 2 UnionFilter bugs: the line-duplication one and the overzealous ORs. Closes #111.
Stop &explain=true from corrupting all future queries.

This was using global variables and was broken since the conversion
to Flask.  Move this data to the flask.request object so it doesn't
affect other requests.
Fix incorrect comments (copy-and-paste error)
Minor grammatical fixes to messages displayed in tooltips.
Use flask.g instead of flask.request to hold private per-request state.
Rename flask.g._explain to flask.g._should_explain
Move initialization of flask.g._should_explain and flask.g._sql_profile
to a before_request handler.
Make `explain=true` option use threadlocals rather than globals. Closes #112.
Change _execute_sql, fetch_results, and direct_result to methods on Query
Make merge_extents and fix_extents_overlap be methods of Query
Move flask.g._should_explain and flask.g._sql_profile to be members of Query
Remove spaces around equals sign in kwarg