Two-dimensional position-sensitive detectors for high resolution diffraction with neutrons and high energy synchrotron radiation