Table CSV import: fix line breaking issues.

Some Excel version (at least OSX) represent line breaks with only \r instead of \r\n, which caused import errors.

With this fix the line breaks are normalized beforehand and sniffing csv dialect as well as URL validation is optimized.

@maethu can you review this one?