GPII-672: Preferences Server Framework, round 1

Hi Antranig - this is the first pass at the preferences server framework. I still haven't got the tests in kettle to run, but everything in universal + windows pass for me. There are some things that are still a bit rough, but if you could let me know which areas are apalling, so I can start fixing those.. Things I haven't looked too much into on purpose is:
* Updating and checking all the config files - as half of these were already broke and we will have to discuss these in cambridge
* Cleaning up all the NP sets -- this is cambridge stuff as well. (obviously, I did update them to be keyed by the ontologies their in)
* Getting too deep in the MM framework. There are several things that could be improved there, but since some of that stuff have to be rewritten/fixed up later anyway, I didn't want to risk getting lost in it and delaying our switch to conditional preferences

Probably clearer to make this into a 3-arg function with the "return value" built up as the 3rd one. Also a standard convention here is to call ret the argument "target" and full the argument "source". Yes, this function needs a substantial comment - what do you think - will you understand what it does in its current condition if you come back to it in 3 months? : P