A Middleware Framework for Constraint-Based Deployment and Autonomic Management of Distributed Applications