[Core] Improve handling of policies

Properly remove loaded policies when the add-ins that
define them are disabled.

Should fix 379 - Cannot enable the C# binding