fix bug introduced in the refactor of variable name

problem found by existing tests.  Yay unit testing
add auto-class mapping to app id

Token Manager now can also track the mapping of generated class name to
app id.  This allows adding sophisticated methods to the generated
classes, and they are guaranteed to be accessible when accessing an app
reference or a reference from an external item.  The new
Chiara\PodioItem::factory() static method can be used to instantiate a
new item with the correct class, as long as the ['app']['app_id'] is
set in the info field.