Tests for trailing comments

Also includes an adjustment to the
code to prevent it from moving the
comments in front of other nodes.

@enebo If you will first look these changes over, I'll merge it in.