[WiP] Fix trial expiration

Separating plan_level from community to a new table for the sake of saving some data about when communities have changed their plan levels.
Pass these as locals to the partial.

APP_CONFIG is somewhat cumbersome, since it's a global object. We want to minimize dependency to that. So, move APP_CONFIG stuff to controller, and pass it to the layout and partial as locals/@variable.