Refactored JoinQuery to be recursive; other fixes
Refactored JoinQuery to be recursive; other fixes

JoinQuery previously used an array of operations to store the query. Now, the
query is defined as a recursive linked list of JoinQuery objects. This is
slightly more efficient in terms of storage, but also allows caching
optimizations and more natural composition of queries from other queries.

Other fixes:

- An incorrect call to Array.IsArray was fixed.
- A missing reference to $q, used in async execution, was fixed.
- A redundant call to normalizeCallback in selectFrom was removed.

atavakoli/angular-join