Freeness of linear and quadratic forms in von Neumann algebras