Skip soft quantization when configured

If the encoder is configured to skip the soft coefficient
quantization in the rate-distortion optimization process, follow
the same configuration in the intra block rebuild stage. This
solves an encoding assertion issue:

BUG=aomedia:1610

Change-Id: I51ff0d3f9c3e7737b0c6985d82f685272ce90305
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 6200cd8..c70deae 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2049,7 +2049,7 @@
        blk_col + tx_size_wide_unit[tx_size] < mi_size_wide[plane_bsize])) {
     // intra mode needs decoded result such that the next transform block
     // can use it for prediction.
-    if (cpi->sf.optimize_coefficients != FULL_TRELLIS_OPT) {
+    if (!cpi->optimize_seg_arr[mbmi->segment_id]) {
       av1_xform_quant(
           cm, x, plane, block, blk_row, blk_col, plane_bsize, tx_size,
           USE_B_QUANT_NO_TRELLIS ? AV1_XFORM_QUANT_B : AV1_XFORM_QUANT_FP);