Rewrote ugly and broken set_connection

I can't test it yet to see if it works because something is wrong in
templates.py which is causing it to attempt to set a connection to the
xml object Text7, which has no connections. The next step is rooting
this out so that I can test it.

I also wrote a generic set_attribute function which can be used in lieu
of all the W.E.T. programming in FactoryTalkXML.py.