Fix for 'conflicted attachments bug'

Fix bug in processOneChangesBatch where multiple leaf revisions having attachments of the same name weren't handled properly. Previously attachments could be locally lost or overwritten in this scenario.
I'd also note why it needs to be keyed by both doc and rev id.