refactor file selection table column index handling

The previous code with column index offsetting was not easy to read: it looked too easy to make a mistake. This tries to change the code to be more obviously correct, so that conditionals for the index offsets aren't needed whenever column indices are queried.

To test, make sure that the table of imports remains correct. Check the tooltips, try adding imports into datasets, screens, of folders, files, etc. and make sure all looks correct. cc: @ximenesuk

--no-rebase