Alberta threatens legal action over Keystone XL pipeline