XCOMMONS-653: Control the dispose() order when disposing Components
* Improve algorithm