[hashmap] Adds `drain`: a way to sneak out the elements while clearing a map.

It is useful to move all the elements out of a hashmap without deallocating
the underlying buffer. It came up in IRC, and this patch implements it as
`drain`.

r? @Gankro
cc: @frankmcsherry
Oh I guess you can theoretically overflow the `uint`, and it could become `null`, so maybe the ptr::read is still necessary? What is or isn't UB continues to sketchy.