Apple Buys Canadian AI Startup as It Races to Add Features