Add Layer::Reset method to reinitialize internal state

The main purpose is to make testing reliable without having to worry about setting `test_iter` and `batch_size` to sweep through the dataset exactly once.  Instead, we "reset" to the beginning of the dataset every time.  Enable by adding `test_net_reset: true` to any SolverParameter.

Current limitations:
-No unit tests (I've tried it out for `HDF5DataLayer` and it works based on the output of `debug_info`, but completely untested for other `DataLayer`s)
-Not implemented for anything using the RNG as we don't have a way to save and restore the RNG state (I've looked into this -- it seems to be completely impossible to do for curand...)