[Extensions/Runtime] Pass runtime variables to the extension process

This allows exporting things like the currently-running application ID to
the extension process.
[Extensions] Add interface to query runtime variable