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
Avoid repeatedly downloading caffe reference imagenet model
Display total num of processed files after computing image mean
Don't create a new batch after all the feature vectors have been saved