EARLIN: Early Out-of-Distribution Detection for Resource-Efficient Collaborative Inference