Allow FileAttachment.file to store longer file paths.

FileField, by default, limits to 100 characters, which was barely enough
as it was. With the new change for prepending a hash, this was
suffocating.

We now set that max length to 512 characters. While that's far smaller
than the max path length of most file systems, it should be enough for
our use, and is far more than what users have had in the past.
Correctly store base revision for Mercurial diffs with parent diffs.

Mercurial diffs with parent diffs do not work at all in RB 1.7.7.1 if there is
no overlap between the files in the diff and those in the parent diff.

This change fixes the issue and improves the method of dealing with Mercurial
diffs that was introduced changeset 6b1f537b4cf9. The old method was somewhat
fragile and was broken by changeset 562a8b4a21a9.

Testing done:
Tested using a local repo on which the problem was originally seen.
Added a unit test that tests this scenario.

Fixes bug 2971.
Reviewed at https://reviews.reviewboard.org/r/4121/