ignore leveldb extension: ldb
remove residual pthread references, but restore in build for gtest

gtest depends on pthread in Ubuntu 14.04
Create base data layer and base prefetching data layer
Extract common data layer functionalities out of the DataLayer
Remove duplicate codes from the ImageDataLayer
Simplify the WindowDataLayer using the base class
The BasePrefetchingDataLayer shouldn't join the thread
Implement Forward_gpu in the base prefetching data layer
Add utility function to convert OpenCV image into Datum and Blob
Add transformer to the memory data layer
Remove pthread which has been replaced with boost thread
Move transform param one level up in the proto to reduce redundancy
Test adding images w/o resizing to the memory data layer
Move the rest duplicate codes of the data layers into their base class
Generalize the conversions between Blob and OpenCV Mat
Fix conflict between nvcc and boost for cmake
Generate random image to test the memory data layer
Directly copy memory into Datum when image is 1 channel & continuous
Add lint rule for caffe data layer setup
Fix the conflict between CUDA and OpenCV for building on OS X 10.8