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

This one is still used and serves a different purpose. It's used when PUTting preferences to the preferences server. We made two decisions when we meet in crete: (1) A preference should be stored in the ontology the user saves it in and (2) no preference should be stored at one time in multiple ontologies (not taking into account contexts).

So if I do a PUT with preference set containing setting Xa in ontology A, and that setting already exist in the preference set stored on server as Xb, in ontology B, we need to make sure that Xb is deleted from the NP set. That is what this filter function does. When storing a preferences set in eg. the flat ontology, all the prefs are first translated to other known ontologies, and then these settings are removed from the prefs set using this filter function. Once this is done, the flat preferences can safely be stored on the server without risking duplication.

Hope that explanation wasn't too rambly. Also - should I add this as a comment to the function?