Group two databases, when one's name is the prefix of the second one. (QA_4_1)

Same PR than https://github.com/phpmyadmin/phpmyadmin/pull/1149 but for branch QA_4_1.