Better support radio inputs in bindProperty and config forms actions.

$.fn.bindProperty() now accepts a radioValue option. If set, this will
manage standard radio behavior between radio input elements and a model
property. Each input is expected to have bindProperty() called on it,
passing a radioValue corresponding to the appropriate value in the
model's property.

When the element's property (which is expected to be a boolean) changes
to true, the model's property will be set to the radioValue. Otherwise,
to prevent conflicts, nothing will be set on the model (with the
expectation being that another bindProperty() will handle the radio
input that's now checked).

When the model's property changes, the value will be compared against
the radioValue. If they match, the radio input will be checked.

The new radio action support for config form list items now support
taking a radioValue, which is then passed to bindProperty.

Reviewed at https://reviews.reviewboard.org/r/6160/
Bump to 0.8.9 dev.
Fix several size-related issues in inlineEditor.

inlineEditor worked alright in most of our previous cases, but while
investigating some issues today, I realized it just wasn't as smart as
it should be.

When figuring out its ideal size, it was assuming that the input would
have the default box-sizing of content-box. If it was anything else, the
calculations would be off, due to assumptions when calling getExtents().
It now checks before deciding what needs to be called.

It has some new smarts regarding the button size allocation.
Previously, it would assume that if there were buttons, and it's a
single-line editor, that the button widths should be factored in. If
custom CSS places the buttons on the following line, those widths
are no longer factored in.

This also goes back to using `display: none` instead of
`visibility: hidden` for the edit icon. This was intended to keep the
height of the line the same so that the text and the content below it
doesn't jump when the icon is shown or hidden. Instead of doing this,
it's now up to the consumer to pick a line-height that's the greater of
the icon height and the text height, and use that for both elements.
That will keep the text and layout consistent.

Changing how the edit icon is hidden also gives us more space for the
actual field, since we no longer need to make room for the icon (to
prevent wrapping).

Reviewed at https://reviews.reviewboard.org/r/6172/
Allow greater control over inline editor buttons and rendering.

The buttons element is no longer always a <div>. If it's a multi-line
editor, it will appear as a <div/>, but if it's a single-line editor, it
will appear as a <span/>. This is preferred over hard-coding a
`display: inline` style on the element, and will have the same effect by
default. Custom CSS can then override it to have whatever display style
is appropriate.

There are also cases where a caller may need to set some properties on
an element before actually showing the editor and triggering the layout
code. For example, an element may need to be set that would impact the
positioning of the buttons or some other aspect of the editor.

To handle this, there's now a beginEditPreShow event that callers can
listen to. This is displayed immediately before the editor is shown.

Reviewed at https://reviews.reviewboard.org/r/6173/
Fix thread-related issues with extension data/media installation.

When attempting to install media/data for an extension, we'd grab a lock
so that only one thread/process on the system could write the files and
update the data at once. When originally written, this worked well
enough, as it was using fcntl.flock() to lock the file. This wasn't
cross-platform, though, so we updated it to use Django's lock wrappers.

Those wrappers are broken in Django versions prior to 1.7, for this
case. Instead of using fcntl.flock(), they use fcntl.lockf(), which is
buggy on Python with threads, and results in separate threads being able
to grab the same lock at the same time, preventing the whole locking
strategy from working.

This is fixed in newer versions of Django, but we can't wait for that.
Instead, we're pulling in the locks.py from Django 1.7 and sticking it
in djblets.util.compat. It's important to note that this module is not
guaranteed to remain indefinitely, as we would like to eventually use
Django's upstream version.

There was also an issue where multiple threads all tried to delete the
lock file. A simple try/except around it fixes this. If the file wasn't
found, we ignore it, since another thread likely deleted it. Anything
else results in a log error. (This was the original problem that led me
down this rabbit hole.)

To ensure that this all works, I've written a new unit test for media
installation. It makes use of a lot of the same multi-threaded testing
that another test used, so that has been pulled out into reusable
functions, simplifying both test cases considerably.

Without these fixes, the new test catches the multiple calls for media
installation, and the breakage from attempting to delete the lock file
twice. With the fixes, the test passes.

Reviewed at https://reviews.reviewboard.org/r/6186/
Add a function to get raw base64 content on Base64Fields.

Base64Field now provides a get_<fieldname>_base64() function that will
return the actual Base64 content, rather than the decoded content.

Reviewed at https://reviews.reviewboard.org/r/6209/
Add a function to get raw base64 content on Base64Fields.

Base64Field now provides a get_<fieldname>_base64() function that will
return the actual Base64 content, rather than the decoded content.

Reviewed at https://reviews.reviewboard.org/r/6209/
Backport splitting all release notes into ReST files.

On release-0.8.x, we moved from the NEWS file to individual ReST files
for the release notes. This backports this change to release-0.7.x.
Require Django 1.4.14 or higher.

Django released a new security update today, which fixes 4 significant
security bugs. We now require this release at a minimum.
Merge branch 'release-0.7.x' into release-0.8.x
Bump our Django requirement to 1.6.6.

This fixes a number of security vulnerabilities found in earlier
versions of Django.

See: https://www.djangoproject.com/weblog/2014/aug/20/security/
Add release notes for Djblets 0.7.31.

This covers all the changes made since 0.7.30.

Reviewed at https://reviews.reviewboard.org/r/6251/
Release Djblets 0.7.31.
Bump to 0.7.32 dev.
Merge branch 'release-0.7.x' into release-0.8.x
Add release notes for Djblets 0.8.9.

This covers all the fixes and improvements made to Djblets since 0.8.8.

Reviewed at https://reviews.reviewboard.org/r/6252/
Release Djblets 0.8.9.
Bump to 0.8.10 dev.
Add a mixin for writing unit tests with custom models.

Django doesn't make it easy to write unit tests that have their own
custom models. The test runner has to add an app with a models.py file
to INSTALLED_APPS, and the models have to live somewhere within that
directory. This is a lot of work, and it's hard to keep things clean
this way.

This introduces a new mixin that can be used to allow a file containing
unit tests to define custom models. The classes that need to use the
models simply define the models within the file, use the mixin, and then
operate on them.

The mixin handles the hard work of sticking the module in
INSTALLED_APPS, loading the module, and also creating a fake 'models'
module to satisfy Django's requirements.

Reviewed at https://reviews.reviewboard.org/r/6245/
Allow unit test docstrings to wrap in Djblets tests.

This ports over Review Board's logic for unit test docstrings to
Djblets, allowing the first line of a docstring to wrap, in order for
more information to be provided.

Reviewed at https://reviews.reviewboard.org/r/6246/