Cost Function done

Completed the code of costFunction.m. Most of the problem set is now
done. Finally.