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.