Waveflow: Enforcing boundary conditions in smooth normalizing flows with application to fermionic wave functions