Analysis of Average Cost Optimality for an Unreliable Two-Machine Flowshop