[api] be easier on the mysql query optimizer

(a.target_project='openSUSE:Factory' OR 0) is the same as without OR
to the human eye, but it invalidates the use of indeces (sometimes?)

It makes the difference between 6273.2ms and 12.3ms, so it's worth it