Added parameter for threaded execution to SSIM, updated unit tests