Support wrapping object without owning them

Objects can be wrapped without ownership, meaning they will not be
destroyed when the wrapper is destroyed. Also, events will not get
dispatched to the wrapper.