adapt agent func key schema to resemble forwards

In order to keep the database as consistent as possible,
extension ids should be used whenever they can be. Agent
func keys now point directly towards the extension used
for logging in or logging out.
Merge branch 'func_key_agent_schema'