add gflags dependency to caffe.
add gflags dependency doc
gflags should preferrably be installed before glog
travis
travis - does adding cflags help? want to keep minimal invasion into gflags installation.
turns out that glog does not compile with gflags 2.1 - compiling glog first and then gflags.
I am really bad at debugging travis.
travis: gflags still needs -fPIC, otherwise it makes caffe cry.
Merge pull request #776 from Yangqing/sweep

Gflags dependency & misc
Solver switching support & implementation of Nesterov's accelerated gradient and AdaGrad
restored vituals in solver.hpp
converted pointers to shared_ptr
fixed solver constructor in train_net.cpp
improved numerical stability for AdaGrad
bugfixes for AdaGrad
Added L1 regularization support for the weights