Quadratic Morawetz inequalities and asymptotic completeness in the energy space for nonlinear Schroedinger and Hartree equations