Kraken: new api ptobject external_code

Will be use by jormungandr to remove the database.
you should take a ref on that (a const one)