Twisted Poincaré duality for Poisson homology and cohomology of affine Poisson algebras