Change line commenting to uncomment if all non-blank lines are commented out

Fixes #2526

This slightly alters the heuristic for deciding whether to uncomment or to comment blocks of code. Previously, it would key off the first line of code and only if that was commented would it check the other lines. Now it checks all lines of code and uncomments the block if all non-blank lines are commented out.