smtp: move email-queue creation to separate function.
core: ensure that the mnesia schema is present on startup.