Allow retrieval of core_info_t for selected core.

Refactor a bit to avoid lots of duplicated
libretro_free_system_info/get_system_info, etc.
Also copy the core_info_t struct on core change.