Deterministic Mechanisms, the Revelation Principle, and Ex-Post Constraints