GBE: Fixed one bug in scalarize pass
GBE: Fixed one bug in scalarize pass

I met segfault at void Scalarize::dce() randomly when I integrate
a openCL kernel to the chromium's GPU process. After discuss with
Yang Rong, I found one bug in this function. As it use two loops
to erase the dead instructions, but it doesn't set the pointer to
NULL at the first loop when it already erased the instruction. Thus
at the second loop, when it call (*i)->getParent, the (*i) may
already be deleted then it may refer a freed region and may cause
segfault.

Signed-off-by: Zhigang Gong <e04a7b9b70b1e4c6318cf117dcd1a9056e14b97a@linux.intel.com>
Reviewed-by: Yang Rong <78759e37dc7114caed18f74e7515c5cb519dbf6d@intel.com>

ignatenkobrain/beignet,ignatenkobrain/beignet,wdv4758h/beignet,zhenyw/beignet,freedesktop-unofficial-mirror/beignet,zhenyw/beignet,wdv4758h/beignet,freedesktop-unofficial-mirror/beignet,zhenyw/beignet,ignatenkobrain/beignet,freedesktop-unofficial-mirror/beignet,freedesktop-unofficial-mirror/beignet,ignatenkobrain/beignet,ignatenkobrain/beignet,wdv4758h/beignet,zhenyw/beignet,wdv4758h/beignet,wdv4758h/beignet,zhenyw/beignet