Theoretical polarization profiles of optically-thick hydrogen lines from slabs in the presence of electric and magnetic fields