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)
Disabling get_energy_max to keep client/server sync
Merge remote-tracking branch 'origin/master' into TDK