Pluggable syncstore backends

This implements pluggable backends for the syncstore API, in a similar vein to the existing pluggability of kvstore.  It includes the original kvstore backend, and a new direct-mysql backend.  I hope to add a cassandra backend sometime soon, so that we can compare them under load.

@zaach r?  It's a biggun, might be easier to review the two commits independently rather than looking over the whole diff at once.