No, you don't need a cancel button
When you're clicking the "Add comment" button, you're not doing anything. You haven't posted a comment yet, so there is nothing to revert.
An undo facility is useful when a user performs an action which has some serious effects. For example, removing an email from your inbox must have an undo, since you may be interested in getting the email back if you hit the button by mistake. If in a large application, like Photoshop, you click on a button which changes the whole layout of your toolbars, windows, etc., then undoing it would be a great feature.
On the other hand, the fact that the comment area is displayed is not something critically important.
If you are removing a part of a page, that may be important enough to include an undo. For example, if there were a button hiding the right panel (tags, related, community bulletin, etc.) in order to enlarge the middle one (question and answers), it would be a good idea to be able to revert this, because you would like to have the ability to get back to the full view. But you are not getting anything more in terms of features by hiding the Add comment form.
Yes, you need a cancel button
For a few people, having a form you don't want to fill is annoying. Not that it wastes space (on a large display, does it really matter?), but it constantly indicates that you, as the user, made a mistake by clicking on the wrong button, or that you had an idea of a comment but meanwhile understood that it was stupid.
This behavior is not very user friendly, and there must be a way to hide the form.
Personally, I understand completely why developers of Stack Exchange decided to not include the undo. A feature like this means more code that you have to test and maintain, and less code is always better. Since the feature would be useful only to a few users, the choice seems reasonable.
Moreover, where would you put the undo element? Just below "Add comment"? What if the user misses the "Add comment" button and clicks on "Cancel" instead? It must probably be appearing as a link, on the right of "help", but in this case, the person could click on "cancel" instead of "help", which would be annoying too.
Escape key would be another way to implement the undo feature, but at a risk, for the user, of clicking on this key by mistake while typing the comment.