Sufficiency and relative entropy in ∗-algebras with applications in quantum systems