Fix wrong ranges of generic type symbols

Close #488.
Fix a related bug in Find All References
Always try to rename the word under cursor

Fix #620.
Fix a few build warnings
Merge pull request #657 from dungpa/rename-generic-types

Fix bugs related to renaming generic types