Assert against duplicated insertion on client-side

Today we can try to put a document that already exists on client, giving either a server error or a SQLCipher UNIQUE constraint error.

Expected behavior: BlobAlreadyExistsError with proper details, before even trying to insert or upload.