A lack of exercise is now causing as many deaths as smoking across the world, a study suggests.