Fix crash with CC accessing registry during jump

Fixed a concurrent access to cores registry between CC and an ongoing
jump
Code cleanup
Better support for core max energy

Added get_energy_max method to protocol to support related configuration
option
Code cleanup (magic numbers)