what is section 1231 gain or loss