Cleaning up magictool -definebyquery so that part1 and part2 queries aren't required (psDBRunQuery takes %s etc). Adding '-available' flag which says 'don't worry if all the diffs didn't make it, just do it with whatever's immediately available.'