Mitchell, Thomas F., Confederate officer