Optimized qubit phase estimation in noisy quantum channels