FIX: belongs_many_many back to the same class type

Currently SS get's confused when referencing multiple of the same DataObject type in a belongs_many_many definition using the dot notation.  It doesn't recognize the dot notation at all, and leaving it off means it will just choose the first match in the many_many definition which isn't correct.  This adds in the dot check and reverse lookup functionality allowing for multiple definitions.

I couldn't find a bug referencing it specifically however there's lots of discussion in the forums and IRC so this problem does in fact exist.
Code formatting isn't correct, same for the other code you've changed in this file. Please check whitespaces and that you've used tabs, not spaces.