Changed Content-Disposition from inline to attachment for raw diff download.

When chrome is presented a file with Content-Disposition: inline, it shows the
file in the browser. This is fine for most things, but for the "Download Diff"
link, we'd prefer to offer to download the file.

Testing Done:
Manual testing with Chrome Version 35.0.1916.114, the affected browser. Also
tested Firefox 29.0. In Chrome, Download Diff now downloads instead of
displaying in the browser window. Added unit test.

Fixes bug 3384.

Reviewed at https://reviews.reviewboard.org/r/5893/
Better handle whitespace in the repository encodings field.

The encodings field doesn't handle quirky data very well. This change strips
each item in the list of whitespace, and filters for non-empty values.

Testing done: Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/5924/
Switch to ldap.initialize() for AD backend.

The AD backend was still using the deprecated ldap.open() call. This is a
trivial change which switches it over to using ldap.initialize(), which just
takes a URI instead of host/port parameters.