Avoid "excessive recursion" error in S2

* Uses push/pop and iteration instead of recursion

* Works for all official core2 layouts, site styled comment pages.
  Should also work for custom core2 layouts which haven't overridden
  EntryPage::print_comments

* Updated core1.s2 reference implementation -- but there's nothing we
  can do for the custom layouts here because most custom core1 layouts
  reimplement this method

* Also prevents recursion error in comment count calculation for the
  page summary module

Fixes #726.
Stop nesting the .comment-thread divs when too deep

Browsers will stop applying visual styles to elements that are very
deeply nested. Our .comment-thread class wraps around each comment +
its replies (instead of each comment), but unfortunately, browsers
aren't very happy with that on long nested threads, and things look
broken.

(In firefox, links lose styling and everything becomes a pile of text at
the bottom. In chrome, the comments are spaced apart, but lose
indentation).

So since we know approximately when this happens, let's stop nesting
before we reach that point. Early in the thread, .comment-thread will
wrap around the comment and its replies. At 180 replies in,
.comment-thread will act like the .comment-wrapper (avoiding further
nesting)

For #726.
Merge pull request #727 from afuna/apply-pop-push-bug-726

Handle deeply-nested comment threads
Cleanup whitespace
Cleanup whitespace take 2