erp5_trade: rework `isQuantityEnabled` and `isQuantityEditable` scripts

The two scripts were a bit too independant from one another, sometimes causing
weird behaviours. Editing a quantity now depends on the quantity being enabled,
which happens when the line is not expected to have cells or sublines.

Also enforces expected behaviour for items: if a product or service has
*required* items, its quantity cannot be edited, since quantity of the items
should set the quantity of the line or cell.
2 jobs for for-mr-pig in 0 seconds
Status Job ID Name Coverage
  External
failed ERP5.Master.UnitTest-Titouan.TestRunner.Pig

03:14:28

canceled ERP5.Master.UnitTest-Titouan.TestRunner.Pig

00:11:01