Fix getting the list of tool executables in the API.

The tool executable queryset returned was sometimes incorrect. For example,
when a tool profile was executed on diff revision 2 of a review request but not
on diff revision 1, this tool profile was not as an executable for diff
revision 1 (which it should have been).

This fixes and simplifies the creation of the queryset.