Callbacks: support priority, simplify implementation
Add a second parameter (priority) to the callback constructors and provide an override for the associated priority. This also simplifies the structure by moving the constructors and function/priority storage into a common base class. Everything also gets inlined as every method here is extremely simple.
Showing with 104 additions and 125 deletions