South Korean ruling party loses key mayoral elections