Use ld to load the SQL scripts

Hi,
 I played around the idea to simplify the process of adding upgrade SQL scripts (f522684761a222f7727098da041cc2a80b6ca133 would need such a follow-up) and replaced the configure/sed magic to generate "#define" statements with some linker magic (that could be replaced with objcopy if needed/wanted).

 I splitted the commit in 2:
- the real changes
- the generated files (IMHO the generated files should not be part of the source repository).

HTH,

Matthieu