Process for the synthesis of 2-(2,5-dimethyl-1H-pyrrol-1-yl)-1,3-propanediol and its substitued derivatives