spanner: fix memory leak with context
spanner: fix memory leak with context

A context cancellation function was deferred inside a function that
never returns, so the contexts were consuming memory until they timed
out. The timeout was only one second, but I guess that could turn into
a lot of RAM.

Also, each defer must consume memory, and that consumption was without
bound. I suspect that is the more likely reason for the memory issue
observed in the bug, though the heap profiler didn't say so.

This also uncovered another bug concerning error-handling, which
will be fixed in a subsequent CL.

Fixes #770.

Change-Id: I3100ce95e8e2be5c3e52c7732d25301d6128ae7f
Reviewed-on: https://code-review.googlesource.com/17250
Reviewed-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Di Xiao <ec9213d8904b2f943c1baacd49a0768011ed5ff4@google.com>

googleapis/google-cloud-go,googleapis/google-cloud-go,googleapis/google-cloud-go,googleapis/google-cloud-go