KT-4950: Insert type intention now only applicable in function names

Fix for this issue http://youtrack.jetbrains.com/issue/KT-4950

Fixes for this previous pr: https://github.com/JetBrains/kotlin/pull/464

changed the way i check offset, added a couple of tests and made stateless