Hybrid Probabilistic Inference with Logical Constraints: Tractability and Message-Passing