Prevent duplicate attachment orderings

Add not null and a unique index on ordering to prevent duplicate
attachment orderings.
Build attachment in normal way

Adding the attachment in this way triggers the before_add hook on
attachable which sets the ordering and thereby ensures that the created
attachment has an ordering value.

This cleans up some clunky code which was needed due to the extra join
model.
Merge pull request #997 from alphagov/prevent-duplicate-attachment-ordering

Prevent duplicate attachment ordering