clean up include files, etc.
made sure to restore number of threads after changing it; eliminated all n_threads fields and arguments from nn classes
reverted two changes that had slown training down: using matrices to compute normalization constants, and using sparse matrices to compute loss function.