Extended Model functionality

Models now support basic relationships, (i.e. one-to-one, one-to-many
and many-to-one). Moved functionality into the ActiveRecord folder and
made a specific ModelCollection class.