factor out tree of if-statements
respect original logic; be more efficient
move variables to be more local to code doing the work
move task import loop into separate function, such that csvreader is parameterisable
factor all the error paths back together
use dict
Merge pull request #410 from mk270/refactor-import-task3

Break up longish import tasks function; make it easier to parameterise CSV reader for other sorts of lists