Convert the members of libevent::Base to use unique_ptr.

This also ensures the destruction order of the members, to avoid use-after-free issues.