Generate integer handle values to allow Factor object references to be passed through the FFI
