Improve efficiency of app publishing

The project publishing form sent the ids of the documents returned by `app.get_latest_saved()` to the server. However, snapshot process required the ids of the original apps, not the latest saved. This meant a query had to be made for each app during the save process. This fixes the problem by sending the original app ids to the server instead. This is a follow on from https://github.com/dimagi/commcare-hq/pull/5167.