Andrew Ngs Class - Why Did He Change up the Cost Function?
The difference is the "original" is the derivative of a cost function and "new" is the result of substituting in an actual cost function. 

When the derivative of a function raised to a power, the exponent becomes a constant. In this case, the derivative of the squared loss function becomes a constant 2, and the 2 in the numerator then cancels with the 2 in the denominator. The result is just dividing by $m$.