Goldie Dimension of Prime Factors of Polynomial and Skew Polynomial Rings