added gflags + bugfixes + rebase on bvlc/caffe
* added gflags requirement in CMake
* fixed a bug that linked some tests into caffe lib
* renamed tools/caffe due to conflicting target names with caffe lib
* rebased onto bvlc/caffe