sanity.c: add apic_ids and apic_copy to the cleanup code

This resolves issue #1.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>