Activated Joins and added functional test

- Implemented Primary Selector on QueryBuilder
    - Allow specification of primary selector
    - If no primary selector given and number of selectors > 1, throw an
      exception.
Merge pull request #363 from dantleech/join_activation

[WIP] Activated Joins and added functional test