IDEA-111450 - Fixes to redundant cast analysis of primitive comparisons

See http://youtrack.jetbrains.com/issue/IDEA-111450