Merge pull request #739 from JustinTArthur/ticket-19855

Fixed typo in legacy database how to
This function is unused and should have been removed a few releases ago.
Add test for collapsible fieldset functionality in admin
Fixed #14571 -- Updated embedded jQuery from 1.4.2 to 1.9.1

Thanks dArignac for the initial patch.
Replaced the obsolete toggle event handling JS function

The toggle(func1, func2) event handling function has been removed
in jQuery 1.9.
Fixed #19598 -- Fixed jQuery tagName retrieving

Thanks rj at rudiculous.net for the report.
Added a db_constraint option to ForeignKeys.

This controls whether or not a database level cosntraint is created. This is useful in a few specialized circumstances, but in general should not be used!
Refactored negated IS NULL handling

This one cleaned up add_filter() negated filter generation. As a side
effect split_exclude() was cleaned up, too.

Refs #19849
Removed join() promote kwarg

The join promote=True was over-aggressive in select_related handling.
After that was removed, the only other user was query.combine(). That
use case is very easy to handle locally, so there is no more need for
the join(promote=True) flag.

Refs #19849.
Cleaned up join promotion in query.combine() with OR

Refs #19849
Added a test for negated Q object querying

The added test is from the patch in ticket #19672 (written by Ian
Kelly). Fixed #19672, refs #19849.
Clarified the language used in the documentation. Thanks to Mike Smith for the report.
Made a couple of selenium tests wait for page loaded

The admin_widgets tests were issuing click() to the browser but
didn't wait for the effects of those clicks. This caused the resulting
request to be processed concurrently with the test case. When using
in-memory SQLite this caused weird failures.

Also added wait_page_loaded() to admin selenium tests for code
reuse.

Fixed #19856
Fixed #19868 -- Clarified purpose of custom user example
Fixed #19870 -- Regression in select_related in inheritance cases

There was a regression in case two models inherited the same parent,
and one contained a foreign key to other. When select_related travelled
the foreign key the other model reused the parent join made by the
first model. This was likely caused by Query.join_parent_model()
addition in commit 68985db48212c701a3d975636123a5d79bdc006f.

Thanks to Trac alias loic84 for report & tests.
Factored code and added a missing docstring.
Fixed #19882 -- Smarter tokenizing of {% for %} tag arguments.
Documented jQuery upgrade

Refs #14571.
Fixed empty strings + to_field regression on Oracle

Querying the reverse side of nullable to_field relation, where both
sides can contain null values resulted in incorrect results. The reason
was not detecting '' as NULL.

Refs #17541
Fixed Oracle regression in last_executed_query() with unicode strings

The regression was likely caused by the fix in #19606 which adjusted
Oracle's unicode detection, though it seems this would have been an
issue in some configurations even before.