issue #22500: move barcode scanner code out of core

There's an important new usecase to one of Travis's innovations in here. Inventory has to update the published fields of XT.app with the barcodeScanner keyCapturePattern, but it needs to wait until the app is loaded to do so, because the capture pattern is in the metrics table and is not known at the time of the execution of the inventory code.

I made the app now emit an "activate" event (using XM.Tuplespace) when it's fully loaded. The code in inventory is listening for that event and will execute when it happens.

Seem reasonable? I've been wanting to do things like this for a long time.