The closure operator in partial algebras with distributive operations. Applications to set algebra, measure theory and linear spaces