improved cleanup
change QPair to tuple for improved readability and type safetity
clean up code for managing descriptions for multiple images
also restore the description when rerunning searches
rewrite Q_FOREACH to C++11 for
Reason: for keyword doesn't copy the list in contrast to the Q_FOREACH macro, so this is slightly faster
rewrite a number of for loops to algorithms to make them clearer
s/Q_FOREACH/for
use algorithm instead of explicit for loop
s/Q_FOREACH/for