Comparison of X-Ray GaAs and CdTe P-I-N Detectors by a 3D FEM Model