Theory of the spin Seebeck effect in antiferromagnets