Separate main from megacmdclient.cpp Reorganization of pro and pri files for client, server and integration tests to support these changes