CVD-diamond-based position sensitive photoconductive detector for high-flux X-rays and gamma rays