Transformation Electromagnetics Based Analysis of Waveguides With Random Rough or Periodic Grooved Surfaces