Ssparate the registration from the constructor
To prevent segmantation fault issue, this patch separates the app com
registration from the app event constructor.
If the main thread accesses the resource of the derived class when
calling the constructor of the base class in the sub thread,
the segmentation fault issue is occurred as below:
--------------------------------------------------------------------------------
Thread 33 (LWP 4401):
#0 0xb5368646 in bundle_free (b=0xabfb0270)
#1 0xb5369538 in tizen_base::Bundle::~Bundle
#2 0xb53c9c1e in (anonymous namespace)::AppComCreate
#3 0xb53c9df8 in aul_app_com_create_async
#4 0xb53a1630 in aul::AppEvent::AppEvent
#5 0xb53a17ae in (anonymous namespace)::AppEventStub::AppEventStub
Thread 1 (LWP 4189):
#0 0xb5398b74 in aul::AppEvent::OnAppStatusCb
#1 0xb53c6bd8 in (anonymous namespace)::AppComConnection::Invoke
--------------------------------------------------------------------------------
Change-Id: I045046f64c1f33dcb4ada22ebbc21cffe97b86c7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>