[to merge with master] customize serialize/deserialize

Do not require xgboost, that is up to the user