Prevent duplicate attachment orderings

Add not null and a unique index on ordering to prevent duplicate
attachment orderings.
Merge pull request #996 from alphagov/prevent-duplicate-attachment-orderings

Prevent duplicate attachment orderings
Fix test failures due to not null constraint on attachments ordering
Revert "Fix test failures due to not null constraint on attachments ordering"

This reverts commit 9ff012b1495c1b50e284dba3c6fbd300e9e9dc6d.
Revert "Merge pull request #996 from alphagov/prevent-duplicate-attachment-orderings"

This reverts commit 3f567213fd77c7ae5ff643f608995bfdf8a3036f, reversing
changes made to a6e30e99269a66bb6affad3637bae37d79524c7b.