Prevent N queries on deploy

Currently, deploying an app causes errbit to update all outstanding `Problem`s in N queries, where N is the number of open `Problem`s on that `App`; this PR reduces this to always require a single query. cc @ggilder