Insert manual joins *after* generated joins.

Re-order query joins to make manually added joins be performed after generated joins. This removes the need to workaround the current join order, or redefine all association joins when you want to add an
additional join on a leaf table.

Refs #2179
Refs #2346