IRS code 121, 1014, and 1031 can help you and your real estate portfolio pay less in taxes and build the legacy you want.