Formation of moon systems around giant planets