Harmonic Bergman spaces, Hardy-type spaces and harmonic analysis of a symmetric diffusion semigroup on R^n