Distributed Inference of Channel Occupation Probabilities in Cognitive Networks via Message Passing