Stacked CdTe gamma-ray detector and its application to a range finder