Effects of bulk and surface conductivity on the performance of CdZnTe pixel detectors