G-Transformer: Counterfactual Outcome Prediction under Dynamic and Time-varying Treatment Regimes