refactor the code that detect multiple execution of atom application. 

:lipstick: add ProcessLaunchDetector class to process multiple execution of atom process. extract the code of creation of client and server from AtomApplication into the new class ProcessLaunchDetector to make code cleaner.

remote the unnecessary invocation 'flattenMenuItems'
The semicolon here isn't needed