Fix dropout backward in TEST phase

This PR just add the option to pass gradients backwards during the `TEST` phase.
@Yangqing I checked the log and it seems that you added the check of `major >=2` https://github.com/BVLC/caffe/pull/502#discussion-diff-14277388R246

Should we keep it or remove it?