Export and import bugfixes.
IO task serialization tests added.
Fix bugs the prevented query execution after IO tasks update.
Removed junk code, added comments.
Minor refactoring in GeneratePartitions