online_runtime_276 Move publish-gear-endpoint logic to the platform

Move the logic for the `publish-gear-endpoint` logic from the hook script in each cartridge to the platform.