Partners plugin and related core hacks/fixes

This request adds the partners plugin and some core changes needed to make it work.
Needs a code review and demo to confirm the features are as expected.