Atomic polarizabilities and polarized pseudo-states in the multiconfigurational approach. I. Theory and application to C, N and O