pycaffe: add unary CaffeNet constructor for uninitialized nets

Note that parameters are uninitialized, not zero-filled.
Merge pull request #365 from longjon/pycaffe-empty-nets

Add unary CaffeNet constructor for uninitialized nets
add HingeLossLayer for one-vs-all hinge loss

This layer implements a "one-vs-all" hinge loss, (1/n) sum_ij max(0, 1 -
y_ij x_ij), with bottom blob x_ij (i ranging over examples and j over
classes), and y_ij = +1/-1 indicating the label. No regularization is
included, since regularization is done via weight decay or using the
parameters of another layer. The gradient is taken to be zero at the
hinge point. This commit only provides the CPU implementation.
make gradient checker's kink use feature absolute value

In theory, layer functions could be nonsmooth anywhere; in all cases in
use so far, they are nonsmooth at either zero or +1 and -1. In the
future, it might be necessary to generalize the kink mechanism beyond
this stopgap measure.
test HingeLossLayer

Based on SoftmaxWithLossLayerTest.
set TRAIN in CommonTest.TestPhase

...to avoid effects of test execution order. The original intention was
to check that TRAIN is the default, but it is better to have consistent
results.
Merge pull request #366 from shelhamer/test-phase-fix

set TRAIN in CommonTest.TestPhase
randomize order of test execution by make runtest
set phase in dropout tests
scope data layer sequence tests to avoid leveldb contention
Merge pull request #368 from shelhamer/fix-data-layer-sequence-tests

Fix data layer sequence tests to avoid leveldb contention and lock failures
Merge pull request #303 from longjon/hinge-loss-layer

HingeLossLayer
add device id arg to test_net (fix #232)
proofreading and trivial polish
Merge pull request #367 from shelhamer/randomize-test-order

Randomize order of test execution by `make runtest`
set seed in neuron and power layer tests for deterministic results
default test net device to 0 and log device chosen
fix test_net to upgrade params from v0 if needed
Merge pull request #370 from shelhamer/test-net-polish

Polish test_net
Handling CUBLAS_STATUS_NOT_SUPPORTED to suppress warning