erp5_stock_cache: Fix Inventory reindex bug and add a test class.

SQLCatalog_trimInventoryCacheOnCatalog needs resource category on movement.
6 jobs for master in 0 seconds
Status Job ID Name Coverage
  External
passed ERP5.CodingStyleTest-Master

00:40:26

passed ERP5.PerformanceTest-Master

00:26:18

failed ERP5.UnitTest-Master

01:11:27

failed ERP5.UnitTest-Master.Medusa

01:10:23

passed SlapOS.Eggs.UnitTest-Master.Python2

00:12:28

passed SlapOS.Eggs.UnitTest-Master.Python3

00:12:23