SyncbaseMain now monitoring todo list collection for destroy

Previously SyncbaseMain was only monitoring the user collection for
deletions, and doing delete from that to trigger todo list collection
destroy.

However, SyncbaseTodoList was doing its delete only by todo list
collection destroy, causing an exception.

I believe we can treat either as primary, and we should be
consistent. Choosing the collection's existence as primary has the
advantage that it is less succeptible to orphaning since the user
collection is the "discovery" mechanism for the todo list collection, so
its entry there should last until we're sure the todo list collection is
gone.

There are also some unanswered questions about what collection
destruction means for other Syncbase instances sharing the
collection. If for example destruction is synced, then we need not
monitor the DELETE event on the user collection row at all (pending
solidification of the sharing scheme). If on the other hand it is not
synced, it is imperative that we react to the DELETE event on the user
collection to sync the todo list collection destroy, and in this case it
is susceptible to orphaning if the application fails to perform this
destroy successfully (e.g. early app termination).

Change-Id: I749f7d09eed4fd867296dbc93277b91445315207
2 files changed