Added a method to get the domain object from ae objects

Namespace, Class, Instance, Method objects in Automation model now
all have a method called domain which returns the domain object
@mkanoor The method domain_name is already doing the look-up work and then just returning the name or nil.  I think it would be better to reverse the logic here and have the domain method do largely what the domain_name method does today and then the domain_name method would simply become ```domain.try(:name)```