libavg_app: refactored instance setup
libavg_app: refactored instance setup

svn path=/branches/libavg_app/; revision=9196

yyd01245/libavg,hoodie/libavg,scotty007/libavg,yyd01245/libavg,libavg/libavg,th3infinity/libavg,yyd01245/libavg,th3infinity/libavg,scotty007/libavg,libavg/libavg,scotty007/libavg,libavg/libavg,hoodie/libavg,libavg/libavg,scotty007/libavg,yyd01245/libavg,th3infinity/libavg,hoodie/libavg,hoodie/libavg,th3infinity/libavg