Propagate the app id to the gears

Switches all gears to using "app._id" instead of "app.uuid", includes migration.