Make make_image_db multi threaded
Make make_image_db multi threaded

Summary:
While waiting for the single threaded version to complete I noticed it
was doing an awful lot of waiting, so decided to make it multi
threaded. Creating a 150GB DB is now ~4x faster on an AWS EBS volume.
Closes https://github.com/caffe2/caffe2/pull/1334

Reviewed By: romain-intel

Differential Revision: D6045259

Pulled By: pietern

fbshipit-source-id: 43f9392a0a383355660a3ead217ab38939dd2bc2

xzturn/caffe2,Yangqing/caffe2,xzturn/caffe2,davinwang/caffe2,sf-wind/caffe2,pietern/caffe2,Yangqing/caffe2,davinwang/caffe2,xzturn/caffe2,caffe2/caffe2,davinwang/caffe2,davinwang/caffe2,davinwang/caffe2,Yangqing/caffe2,pietern/caffe2,sf-wind/caffe2,xzturn/caffe2,sf-wind/caffe2,pietern/caffe2,pietern/caffe2,sf-wind/caffe2,pietern/caffe2,sf-wind/caffe2,xzturn/caffe2,Yangqing/caffe2,Yangqing/caffe2