US mayor resigns after racist Michelle Obama post