Scientists have developed a magnetic heat pump that works just as well as standard air conditioners and heaters without using harmful chemicals.