Apple announced a line of slim iMac computers and iPads with higher-quality video that use its own processors, as it speeds its migration away from Intel and caters to a work-from-home world.