Joint optimal production and replacement policy for a deteriorated closed-loop manufacturing system