Fixing the MySqlPageGenerator

MySqlPageGenerator code was broken (e.g getting into site.encoding(), while site is a string).
This fix it by expecting site to be site object and never set it to string, to avoid messy code.

To allow users to override the dbName of a site, it is now possible to set the db name in the config.
For example in wmflabs, users may want to set db_name_format = '{}_p'

Also adding support for connection configuration file.

Change-Id: I8931fd456fb6dc67e668421469b6ada07ed827ef
Merge "Fixing the MySqlPageGenerator"