Partial porting of inference. Got errors in data unloader.

- preparing to merge with master for newest changes
Finished first version of porting

- not optimized for multi-node mariadb
- Sequential assign ID, no parallel load/unload