make CheckGradientExhaustive fail for topless layers

Without this commit, it is possible to mistakenly call
CheckGradientExhaustive on a layer with no top blobs (i.e., a loss
layer), causing the gradient check to silently succeed while doing
nothing. With this commit, doing so will cause the test to fail.
Merge pull request #350 from longjon/finicky-exhaustive

Make CheckGradientExhaustive fail for topless layers
add forward tests (via reference impl) for SigmoidCrossEntropyLayer
add random_seed field to SolverParameter and have solver use it --
already works for lenet, doesn't work for imagenet w/ rand() calls
add data layer crop tests
add tests for random crop sequence -- currently both fail
cleanup data_layer, add prefetch_rng_ field to it and use instead of
rand -- seeded tests still fail
make seed test pass by setting up new layer to generate the 2nd sequence
test scale param
prefetch_rng in ImageDataLayer
prefetch_rng in window_data_layer
replace remaining uses of rand() with caffe_rng_rand()
replace std::shuffle with version using prefetch rng; improve unit test
add caffe/random_fn lint rule to check for use of rand, rand_r, random
test on "0th iteration" -- before doing any training
Merge pull request #357 from jeffdonahue/test-on-iter-0

Test before doing any training
Merge pull request #352 from jeffdonahue/solver-seed

Eliminate use of "rand" in code; enable deterministic results via solver seed
Update the drawnet.py to reflect the recent revised net definition.
note pydot dependency of model visualization
Merge pull request #364 from niuzhiheng/dev

Update drawnet.py to support new-style net definitions