how to avoid capital gains tax when selling an investment property