astakos: Lock chain for projects, user for syncing
Lock project's chain for every operation affecting either a project or an application. Subsequently, lock user when needing to sync or to issue commission to update pending_app quota. In views, replace locking qh_add_pending_app with check_pending_app_quota, which will only query quota, so that to respect the above mentioned order. Order by id when locking multiple users.