Dual pairs and tensor categories of modules over Lie algebras \widehat{gl}_{\infty} and W_{1+\infty}