Implemented contractive autoencoders

Added support for [contractive autoencoders](http://machinelearning.wustl.edu/mlpapers/paper_files/ICML2011Rifai_455.pdf) to CAutoencoder
check_gradients() compares the gradients computed with backpropagation with ones computed using numerical approximation and returns the average difference between them, so if everything is implemented correctly it should always return a number that's close to zero.