Fix uploading diffs in the New Review Request page.

Review Request #6732 — Created Jan. 5, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
64b81e0...

Reviewers

The recent work to improve serialization for resource models left out
the Diff model, while also removing the ValidateDiff model's toJSON
function. This resulted in Diff's toJSON being used without factoring in
the repository attribute in ValidateDiff.

This code is now all converted to use the new serialization code, fixing
diff uploads.

Tested uploading a diff with and without errors (short SHA1s). Saw the errors
in the error case, and got a review request with the right diff in the success
case.