java: Switch to the new init/login scheme

The new scheme works like this:

 - init() function is synchronous, it takes the configuration
   parameters and, if isLoggedIn() is true then it starts Syncbase. It
   expects that the database, userdata syncgroup, etc. to already
   exist.

 - isLoggedIn() function is synchronous and it requires init() to have
   been called.

 - login() function is asynchronous, does the oauth token to blessing
   exchange, it requires init() to have been called, starts the
   Syncbase and creates the expected default state (create the default
   database, userdata syncgroup, etc).

 - database() function is synchronous, requires that isLoggedIn() is
   true and returns a Database object right away.

This change only partially implements the above plan (the login is not
wired yet).

The C API gets two new functions:

  - v23_syncbase_Serve(cErr *C.v23_syncbase_VError)
  - v23_syncbase_IsLoggedIn(cIsLoggedIn *C.v23_syncbase_Bool)

The Java high-level API doesn't have the inner DatabaseCallback and
have instead an inner LoginCallback.

This change also switches the tests for core/ and internal/ to
init/shutdown a single time. These makes the tests much faster.

MultiPart: 2/2
Change-Id: I23162b3d4b1e9b3400512536a48ad5ee66c25155
16 files changed