Fix LRU problem of only using first block of array

LRU class only use the first block of array in perarraymap for removal. It is possible that the data ptr of that block is null, so nothing is freed at all. This problem leads to an unchanged remaining_mem, and a dead loop. I modify the function so that it will return the first block with no null data ptr, or continue searching in other arrays.