Move CAF::Application initialization to a separate class

Contributes to #8