Moulding machines for making moulds or cores of particular shapes equipped with templates, e.g. for sweeping operation