Use old laststoragesync mode for API version 1
Return error message instead of hanging sync for huge notes
Use default libcurl SSL verification
Fix intermittent upload error due to duplicate relation ids
Properly clear memcached tx state when committing with empty queue
Along with 73595d1156, fix and test Zotero-Write-Token
Check write token for any write method
Fix new link attachment with itemKey specified
Better error message for invalid tag object
Fix excessive item version updating modifying item tags via sync

When a tag was changed on an item during sync, all items linked to the old tag
were modified instead of just the one from which it was removed.
Write privileges weren't being enforced for processor-based writes

The edit check was looking for a global variable that wasn't set in the
processors. If someone knew what they were doing, they could modify (but not
read) data in a library they didn't have write access to. (To do this to a
specific library, they likely had to be a member, since I don't think the
libraryID is exposed except via classic sync.) The write would have been
recorded under the username of the modifying user.

API-based writes and syncs small enough to be processed inline were being
checked properly.
Handle read-only shards for all queries
Add timing stats for memcached requests
Don't generate end-of-request stats if StatsD is disabled
Add session-cookie users to DB if they don't exist
Generate stats for API version
Allow super request to laststoragesync
Fix implicit limit of format=bib
Deny access by IP on testing domains
Recursively strip control characters from API JSON input