now, there is only one binary that starts both servers,
making them use the same SQL connection.
this commit also added some `defer tx.Commit()` to ensure
all the transactions were closed
- Move mail functions to its own packages;
- Move bigger router functions to its own functions, and separate
router creation from main function;
- Edit the algorithm that choses the format will be chosen with
regards to format preference to a simples one.