Donaldson-Thomas theory for Calabi-Yau 4-folds