If you buy and sell a residential property within two years, new tax rules may apply to the gain (or loss) that you make.