Despite saying it needs about $650 billion of investment in its energy sector, Canada’s rejection of a Malaysian bid for one of its natural-gas companies may spell trouble for more foreign investments in the country.