Logistic regression gradient fixed

The gradient of the logistic regression was not accurate. Please see last equation on page 18 from Andrew Ng's lecture notes (http://cs229.stanford.edu/notes/cs229-notes1.pdf)