Apple Inc., Alphabet Inc.'s Google and Amazon.com Inc. — three of the biggest providers of smart-home and voice-assistant technology — are joining forces to make internet-connected homes easier to set up and safer to use.