General Transport Theory of Noise in p-n Junction-Like Devices