Cluster partition function and invariants of 3-manifolds