core: add function to get CPU id/serial number

See RIOT-OS/RIOT#19 for real world example.