WCMS-349 Added attachments to groups, added attachment sorting for group...

...s
This is an N+1 query. If I'm understanding it correctly I think it could run faster like

```ruby
Attachment.find(params[:attachment]).each_with_index do |attachment, index|
  authorize attachment
  attachment.update(order: index+1)
end
```