fix bad json errors after migration

fixes #2211
fix missing files in database after upgrade

* move files update process after orders update since they need updated orders
* add some facility to display what's wrong in the file registry (like missing)

fixes #2327
make sure there is a multiparts in the json job

This is mandatory by agents because they fails if this key is not present (even if it's empty)
clean some code and comments

ok this is not properly related to update but the code deserved a good clean
Merge remote-tracking branch 'origin/glpi0.84' into glpi0.84+fix_deploy_upgrade
fix files reconstruction errors after upgrade

FusionInventory agent were not able to reconstruct some files because
fileparts migration to manifests files were not ordered correctly.

fixes #2328
Merge remote-tracking branch 'origin/glpi0.84' into glpi0.84