[analyzer] Implement "Loop executed 0 times" diagnostic correctly.

Fixes <rdar://problem/13236549>