Prevent N queries on deploy

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