Added multithreading for image matching and further improvements for cascade hashing

Change-Id: I459c728fe977bbcf80c60b1c2e87946d54a55e90