[Reviewer: Rob] Set up our logging functionality earlier

Rob,

Please can you review my fix to https://github.com/Metaswitch/homestead/issues/7 (which also applies to ralf)?  Just like https://github.com/Metaswitch/homestead/pull/143, this is exactly the same as your fix to sprout (Metaswitch/sprout#441). I've tested this live, but not UT-ed (we don't have a UT for main.cpp).

Matt