Optical quantum nondemolition detection schemes in χ(2) media