Fix bug #3879 Import broken for CSV using LOAD DATA

The bug was due to two issues:

1. Not providing the $import_type, and ImportLdi.class.php not being included as it only included when $import_type === 'table' --> Fixed by providing the required parameter.
2 Trying to access out of scope variable $table --> Fixes by importing it with global keyword

I found the that a similar issue is causing problems in importing content to an already existing table with CSV. Fixed in a separate commit,  4477494