pycaffe: allow unspecified mean. Fixes #671.
pycaffe: reorder exceptions

It doesn't make sense to complain about input not being batch-sized if
it isn't even 4-d in the first place.
pycaffe: test channel_order and input_scale against None

An input_scale of zero should produce warnings/errors/infinities rather
than being the same as an input_scale of one. A channel_order of () or 0
should not be equivalent to the default ordering.
gflags 2.1 bugfix (or rather a hack).
fixing comment
Merge pull request #733 from longjon/pycaffe-tweaks

pycaffe fixes
lint
Merge pull request #812 from Yangqing/sweep

gflags 2.1 bugfix (or rather a hack).
Add NetState message with phase, level, stage; NetStateRule message with
filtering rules for Layers.
Incorporate NetState{,Rule} into Solver/Net.  Net::FilterParam
includes/excludes layers based on whether the NetState meets each
layer's NetStateRule(s).
Add INPUT layer so deploy nets can be incorporated as well.
Use unified train/test nets in examples.