Dynamic control of quality in production-inventory systems :coordination and optimization