merge: use any() instead of for loop when checking for dirty subrepos
I think it's both simpler and clearer to use any() than the current
for loop.
While at it, also drop the call to sorted(), since it doesn't matter
which order we iterate over subrepos.