Packaging machine for the production of folding cartons