On the threefold minimal model program in positive and mixed characteristic