Point defects, impurities, and small hole polarons in GdTiO$_3$