support has_an_belongs_to_many relations

Suport for HABTM relations via manual join clauses based on relation association. Also I've refactoed a little and extracted the side load relation setup into a separate class.