tabletserver: efficient update rewrites

tabletserver rewrites a DML this way:
From:
update table set val=:val where (where clause)
To:
select table where (where clause) for update
loop: update table set val=:val where pk1=:v0 and pk2=:v1
(one statement per row)

The new implementation rewrites it as a single statement:
update table set val=:val where (pk1, pk2) = (:v0,:v1)
or (pk1, pk2) = ...

Such rewrites allow us to identify rows that are changing.
Additionally, they make replicas do less work because the
statements do not incur the full cost of the original where
clause. However, it's offset by the number of statements
that are generated per original DML. This last problem will
be addressed by the new change.

I've also changed all internal bind variables to start with
'#' so they won't collide with any user-defined ones.
Distinguish log drop counts between internal and per-client.

If you're seeing drops, it would be nice to know what is slow.
Remove StreamLogger.size.

This value optimises for the wrong case: the case where the feature is
unused. If a feature is inefficient, the correct approach is not to
optimise for avoiding its use, but to resolve the inefficiency.

Additionally, the common case is for this feature to be used. We have
found it useful to have an always-on querylog. We have found it to be
reasonably efficient.

This "optimisation" was added with the first iteration of this feature
and likely falls into the category of premature optimisation.

TODO(plobsing): eliminate flakiness and sleepy races in the
streamlog_test.
tabletserver: unify select rowcache codepaths

With the new where clause generation that works for both
single and composite primary keys, we can unify the code paths
for all the select plans.
Fixup streamlog test.

If we're more synchronous, we can be less flaky. ServiceManagement is
too heavyweight for what we're trying to accomplish in this test.

Also discovered that the ServeLogs handler doesn't return to the client
until it serves the first method (this broke a test rewrite). This has
been annoying me anyways on some low-traffic servers, so fixing that was
a nice pickup.
Add positive-result counters to streamlog.

It would be useful to consider drop counts as a fraction.
rowcache: subqueries for composite pk tables

Rowcache is even betterer now! IN clauses and subqueries
can work for tables with composite pk also.
rowcache: pass_select for covering index queries

If a query has a covering index, skip rowcache.
Merge pull request #96 from plobsing/per-subscriber-counts

Improvements to StreamLogger
Retry topo read with timeout to avoid test flakiness.

The test_no_mysql_healthcheck was sometimes failing to find the mysql
port in the topo entry. There's no guarantee that the topo has been
updated as soon as the tablet reports being in SERVING state, so we
may need to wait and re-read the topo entry.
Merge pull request #97 from youtube/suguwork

Suguwork
Merge pull request #98 from youtube/tabletmanager-test

Retry topo read with timeout to avoid test flakiness.
Use Guava 11 in GoRPC lib

We've been using Guava 18 which is not backward compatible with the
version 11 used by Hadoop core. Downgrade to avoid version conflict.
Use maven shade plugin to generate jar with dependencies

FieldType VT_VAR_STRING (varbinary and varchar) should be casted to byte array instead of String
Use Guava11 to avoid version conflict with Hadoop
VtGate Java Client: Add ExecuteBatch API call

ExecuteBatch lets multiple queries to be executed in single round trip
to the server.
tabletserver: bug fix for update statements

For update statements, the new bind vars have to be added
to the original bind vars (instead of replacing them). This
is because SET clauses can use bind vars.
Merge pull request #99 from youtube/suguwork

tabletserver: bug fix for update statements
rowcache: support for limit clause

The previous rowcache implementation only supported "LIMIT 1"
for primary key fetches. This CL extends this suppport for
IN clauses and subqueries. It also supports limit clauses
with bind variables, which requires validation to be delayed
till the execution phase.
Create vtocc.md
Update vtocc.md