Code cleanup [fixes #906]

I'm using the inspections in IDEA to make sense of what can be removed or not

- [x] remove unused assigns
- [x] remove code that is always constant in conditions
- [x] remove unused declarations

I'm also testing [reviewable.io](reviewable.io) for code reviews as it seems.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/go-lang-plugin-org/go-lang-idea-plugin/998)
<!-- Reviewable:end -->