Fix attachment ordering part 3

https://www.pivotaltracker.com/story/show/58806434

```
For each document,
unless we know it was manually ordered,
for each edition within that document,
if it was created before the polymorphic deploy,
or it's the first edition since that deploy, unless it was created after the timestamp ordering fix,
set the attachment ordering to the same as the attachment's ID since it requires 2 editions past the deploy to alter the order of the IDs,
otherwise,
use the ID order of the last known good edition as per the previous rule.
```

This PR is in need of the normal sanity checks.

The standalone fixer has a unit test which can be removed if desired after we're happy this is all done with.  It now loads fixtures direct from SQL files and has no other dependencies.

Since this is one-off code I'm not too worried about the code being messy so long as it's correct.

This should be followed up at some point to do the following:
- Delete all attachments with a null attachable_id
- Update ordering for all editions previous to a manually ordered edition
- Add unique and non-null restrictions to the ordering column
- Add these restrictions to the styleguide for all future ordering columns