Linear polarization of hydrogen Balmer lines in optically thick quiescent prominences. I. Theoretical investigation