Feature extraction, feature binarization and image retrieval examples

This pull request is reopened(#141) to target the dev branch. It serves for two purposes.

First, Extracting data from a specific blob or layer by number index is very inconvenient. To satisfy the strong requirements of easy feature extraction, Has/Get Blob/Layer methods are added to simplify feature extraction. CAFFE represents [Convolution Architecture For Feature Extraction](https://docs.google.com/presentation/d/1lzyXMRQFlOYE2Jy0lCNaqltpcCIKuRzKJxQ7vCuPRc8/edit?pli=1#slide=id.g176186a76_028). So let's have a feature extraction example.

Second,  the very natural next step is to apply the extracted features in practical applications, e.g. image retrieval. Image retrieval is fastest when using binary features. But putting all the steps of a complete pipeline in an example is too complex. Thus a feature separate feature binarization example is split out.

The pipeline consisting of feature extraction, binarization and similarity searching has been tested to work well on the mnist prototxt and leveldb.

Related issues:
#20: Extract the middle features
#112: pythonic export of features and params for wrapper
#139: About dump_network.cpp