Extract features from Imagenet, LMDB dataset, C++

Update and fix the feature extraction code.
Any network can be used, any layer extracted. The result is stored in a
leveldb dataset, containing pairs of (image index, descriptor values)