Update ImagineDimensionReducer

Add reduce_data_to_json function that write the reduced data to a
JSON file. Add make_thumbnail function to make thumb nails of images.
Changed the number of the function remove_data to clear_data. Fix
bugs. Update test.py to work with new functions.