Move elements to new buffer in HasMap instead of copying.
Fix a possible assertion in Libevent2ManualEvent caused by an AA bug (by using a custom ArraySet!T instead).