INVESTMENT AGREEMENT by and between TEEKAY OFFSHORE PARTNERS L.P., and BROOKFIELD TK TOLP L.P. Dated as of July 26, 2017