General methods for synthesizing 2,4-diacylpirroles and their precursor containing one or two masked acyl groups