Manual changes of pull-request Move per-core "coreid" variable into
BaseCore.

Moved coreid into basecore and made a get_coreid() to grab the variable.