Synthesis of pyrrolo[3,4-b]pyrroles and perhydrothiazolo[3′,4′-2,3]pyrrolo[4,5-c]pyrroles