Add new feature to make PostStateChange call back methods invoked by priority

We have 3 dimensions to consider for compare, and the smaller the
value, the higher the priority.
1. Priority (default is 10)
2. Inheritance Level (current level is 0, minus one when to super class)
3. Generalize ( common is 0, from is 1, to is 2,  specific is 3)
The compare order is use priority first, when priority same, try
inheritance level, and when inheritance level same, try generalize.