what was the first independent republic of latin america and who led its rebellion?