Add support for custom context processors, and make them and apps ref-counted.

This introduces a new Extension.context_processors list, which defines
context processors the extension wants to have available for all
templates.

It also adds protection for both context_processors and apps.
Previously, extensions were assumed to never list an app that another
extension may list, or that the main application lists. Otherwise,
disabling the extension would remove the main item from that list.

The list of context processors and apps are now ref-counted.
ExtensionManager wraps its own access to
settings.TEMPLATE_CONTEXT_PROCESSORS and settings.INSTALLED_APPS.
It won't add new entries if they already exist, and won't remove
entries unless the ref count drops to 0.
Add new arguments and better heuristics to $.fn.positionToSide.

positionToSide had trouble matching an element when positioned, say, to
either above/below another element, when the left or right of the
element would be scrolled off-screen. The "best guess" logic failed,
since it took into account both positions. Now it only computes the
position for the side it's checking, and leaves computing the other axis
until after it finds the best side.

There's some new options for controlling positioning as well. Instead of
just 'distance', there's now 'xDistance' and 'yDistance'. These both
fall back to using 'distance' if not specified.

'xOffset' and 'yOffset' control offseting the element in the direction
not matched up to a side. That's useful when you want to push the
element by a few pixels in one direction relative to the side.

Last, but not least, fitOnScreen now anchors things going off the top or
left of the scroll position as well, instead of just the bottom or
right.