Minimalistic weap_ptr_factory inspired by Chromium's base::WeakPtrFactory.