[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
I think it should work if you put an explicit type annotation on end, i.e., `let end: *const T = if ...`. Otherwise, there is no reason for the compiler to try to coerce, it just tries to find a common supertype for the two arms. (Disclaimer: I haven't checked that this actually works).