Fix bug with self referential many to many relationships
Fix bug with self referential many to many relationships

* Alias tables in m:m queries when necessary
* Move the query conditions from the relationships from the WHERE clause
  to the ON clause.
* NOTE: need to clean up SQL generation soon.  This was a really painful
  fix, and the code needs major refactoring in order to resolve other
  outstanding tickets.

[#902 state:resolved]
[#1065 state:resolved]

datamapper/dm-sqlserver-adapter