Using D-operators to construct orthogonal polynomials satisfying higher order difference or differential equations