Fix compilation warning and bug when check RAM resources in Prefetch::CreateTaskForFirstUndownloadedBlock().