Added contrastive loss layer, associated tests, and a siamese network example using shared weights and the contrastive loss.
Update readme.md files of cifar10 and mnist examples. Fixed broken links.
Updated mnist/readme.md file with additional information.
test convolution against explicit reference implementation

To thoroughly check convolution, the output is compared against a
reference implementation by explicit looping. Simple and group
convolution by the Caffe and cuDNN engines are checked against the
reference.
test convolution by random weights for robustness
[docs] comment ConvolutionLayer
[docs] lenet grooming
Merge pull request #1100 from cNikolaou/issue1099

Polish mnist + cifar10 examples.
Merge pull request #1104 from shelhamer/conv-comments-tests

Document and Test Convolution
use Blob directly instead of shared_ptr for EltwiseLayer::max_idx_

This is in keeping with #742.
add abstract Layer::Reshape, and document the new method protocol
don't reallocate blobs when shrinking memory use

This allows nets to be reshaped very quickly (essentially for free) as
long as sufficient memory has been allocated. Calling Blob::Reshape in
order to free up memory becomes impossible; however, this is not a
normal use case (and deleting blobs does free memory).
enable reshaping in the forward pass

Note that calling Reshape when no reshape is necessary should be
effectively a no-op, so this is not a performance regression.
separate setTensor4dDesc from createTensor4dDesc

This will make it possible to add reshaping to cuDNN layers.
separate setConvolutionDesc from createConvolutionDesc
split off Reshape for data layers
split off Reshape for loss layers
split off Reshape for neuron layers
split off Reshape for common layers
split off Reshape for vision layers

Note that we are dropping some checks from LRN layer. However, these
checks are fairly redundant; something is very wrong if these layers
are producing top blobs that are different sizes than their inputs, and
tests are the right place to catch that. The thing that really should be
checked (that isn't) is that that local_size needs to be odd; this will
be added in a future commit.