Linearity and Optimum Working Density of Optical and Nuclear Emulsions