Efficient predictive coding in neural networks in the presence of disorder and delays