fixPosition was using the "tabbed in" index instead of the actual
character index when scanning a line for tabs. This caused incorrect
positioning of the cursor for some errors
Revise mapping from visual to real char index

The previous commit fixed a bug in JSHint.fixPosition(), that maps from
JSHint's "visual" positions to real character indices. Refactor this
method to make it more comprehensible, add unit tests.