Account for extra whitespace in Django 1.6 in regressions tests

Signed-off-by: Don Naegely <naegelyd@email.chop.edu>
Update join creation to support changes made in Django 1.6

Signed-off-by: Don Naegely <naegelyd@email.chop.edu>
Update tests to account for extra whitespace in SQL in Django 1.6

Also updates the formatting of the long SQL statements to make them
easier to read.

Signed-off-by: Don Naegely <naegelyd@email.chop.edu>