Add package_state to export variables

'package_state' will be returned by the API amongst rest of the App
details. Associated tests check that this attribute is consistent with
the App state, and that users cannot set package_state through the API