* TSX rises 50.21 points, or 0.41 percent, to 12,187.39 * Eight of 10 main sectors advance * CP Rail up 5 percent after job cuts * Primaris Retail gains 14 percent after buyout offer By John Tilak TORONTO, Dec 5 (Reuters) - Canada's main stock index rose on Wednesday, led by energy stocks on optimism about Chinese economic growth and by a rally in Canadian Pacific Railway Ltd on its plan to cut jobs in a bid to lower costs and increase efficiency. Chinese Communist Part