Make Document.idmap key to Atom.
Merge pull request #3442 from saneyuki/atom

Make Document.idmap key to Atom; r=Ms2ger