Fixed locking in sdaiApplication_instance.cc

The STEPattributeList data was being iterated and modiefied by the SDAI_Application_instance class without invoking the mutex of the STEPattribute class. This was fixed in this commit.
Minor STEPcomplex optimization

Collapsed an if condition into a while condition without changing the semantics
Made STEPcomplex thread safe

The assumption used was that STEPcomplex class wont in future provide an API through which threads can remove / insert a STEPcomplex node.
Three already declared mutexes were used in for this purpose:
(1) A recursive mutex for each STEPcomplex node (borrowed from the superclass SDAI_Application_instance)
(2) A recursive mutex belonging to AttrDescriptorList class (originally defined in SingleLinkList class)
(3) A recursive shared mutex belonging to EntNode class.

The fixed order between the locks was: (2) > (1). (3) was independent.