This patch adds the core code needed to manage custom manipulators as part of the window manager. WIP code documentation can be found here: https://wiki.blender.org/index.php?title=User:Julianeisel/Custom_Manipulators
I'm aware that the general manipulator architecture of this patch still has some rough edges, but I think it's definitely ready for an initial inclusion in master (assuming it's rather bug-free ;) ). I also don't think we should spend too much effort on review, making sure there are no major showstoppers should be kinda enough. More work can still be done, this is just the first milestone for moving the custom manipulators project towards master.
My plan is to get this patch into master (or 2.8 branch) and then finish some initial manipulators (e.g. new transform manipulator) so we can merge them too.
This work isn't completely my own, all the initial work was done by @Antony Riakiotakis (psy-fi) and - although it has changed a log since them - it's still the same in essence. Either way, he definitely deserves a big credit! Some changes in this patch were also done by @Campbell Barton (campbellbarton).