genericize 'set custom field'
This builds upon the unreleased work of @BjoernE to make the "Set Custom Field" work with any entity, not just contact entities. It also fixes an infinite loop condition.
This isn't as good as it could be - ideally you could set a custom field on an entity other than the one that triggers the rule - but I think it should have full compatibility with the current rule and more flexibility besides.
I also fixed a problem in upgrade method 2046 - which I can break out into a separate MR if requested.
Edited by jaapjansma