The describe requests were launching a storm of RLocks which weren't
safe in the presence of goroutines trying to acquire write locks.
Instead, make the corpus locking the responsibility of the caller and
add Lock/Unlock/RLock/RUnlock methods to the index and move locking up
a level.
This also adds a fair bit of context.Context plumbing which was used
in earlier debugging.
Fixescamlistore/camlistore#709
Change-Id: I8d7254d1e1da541f8c080d62f5408aac807fd3b1
1) revert to printing to stdout (broke in
08923e1c00) for actual output
2) do not warn about different identities when "syncing" to stdout
3) check blob was actually described before using its fields
Change-Id: Ibb3aa4c560e1b0036aba080807400e8820163cc9