WL#3089: Refactoring for multi-source and info system tables

Affects: Server-7.1   —   Status: Assigned   —   Priority: Medium

DESCRIPTION

Take refactoring parts of the WL#1697 Multi-source code (that have
already been agreed with/preliminary reviewed by Mats and Guilhem),
port it to MySQL version 5.2 and push it.


RATIONALE

Doing this first step will
1. make the code easier to maintain
2. make multi-source easier to implement, 
3. make info system tables be easier to implement.
Since this is only refactoring and it has been discussed/reviewed 
before, I hope no long descriptions are needed and we can instead 
study the patches.