Investigation of charge carrier transport and charge sharing in X-ray semiconductor pixel detectors such as Medipix2