A distance ranking algorithm for indentifier completion

Connected with issue #180. Sort near cursor candidates basing on their
distance and frequency in the cursor's neighborhood. Through limiting the buffer contents
to a certain cursor neighborhood it's quite fast even though this is pure Python implementation.