Add and test Net::HasBlob and GetBlob to simplify feature extraction

Inspired by @kencoken's commit f36e715
https://github.com/kencoken/caffe/commit/f36e71569455c9fbb4bf8a63c2d53224e32a4e7b

Related issues:
Add and test Net::HasLayer and GetLayerByName
Add image retrieval example
Add feature extraction example
Add feature binarization example
Simplify image retrieval example to use binary features directly
Add __builtin_popcount* based fast Hamming distance math function
Fix bugs in the feature extraction example
Enhance help, log message & format of the feature extraction example
Fix bugs of the feature binarization example
Fix bugs in the image retrieval example
Fix saving real valued feature bug in the feature extraction example
Change feature binarization threshold to be the mean of all the values
 rather than zero in the feature binarization example
Save and load data correctly in feat extracion, binarization and IR demo
Move extract_features, binarize_features, retrieve_images to tools/
Use lowercase underscore naming convention for Net blob & layer getters
Fix cpplint errors for Net, its tests and feature related 3 examples
Don't create a new batch after all the feature vectors have been saved
Add a python script to generate a list of all the files in a directory
Add documentation for the feature extraction demo