(PE-2329) bootstrap things in the correct order

Refactor the bootstrap code so that things are done in the correct
order:

1. read logging config values from .ini file(s)
2. configure logging
3. configure plugin system
4. do the rest of the boostrap process