Transfer some functions to computation_functions.cu
Change rowSum and colSum functions
Add KL computation and fix computations of delta2 and delta3

Computation of the network with the KL addition to cost was added.
Also the computations of both delta2 and delta3 were changed
because there were some precision problems with the order of
computations.
Improve memory usage

Free device memory that is not needed before the end of the program.
This will be useful for training in GPUs with less memory.
Improve memory usage

Improve GPU's memory usage by freeing unused memory when it is not
needed.
Add comments for CUDA C code

Additional comments that clarify things are provided.
Clean up code

Code has been cleaned up and additional comments where provided
when needed.
Change comments in .m files

Comments in .m files were reduced and changed, in general. This was
done to only keep the needed informations.