Free Monoids over Semigroups in a Monoidal Category: Construction and Applications