make rename\gotoDef work at the end of token

enable scenarios when cursor is positioned at the end of token
I would remove getTokenAtPosition and add a getTouchingToken overload that simply doesn't take the predicate (or make the predicate optional).