Squashed commits from first shot on bug fixes, code cleanups, minor additions.

Added helper methods to set, release and check user_id in zmq_target.

Fixed typo in calling _prepare_u1db_action.

Removed local U1DB trunk files. Now installed as a dependency.

Fixed database opening issues. Now, u1db can open a database based off a user_id, provided that database is already present.

Updated requirements.txt

Fixed data being packed into message structures.

Changed type of doc_rev to string. Modified tests accordingly.

Added workaround to find out last_known generation and trans_id before validating them in prepare_for_sync_exchange.

Fixed bugs in sync. Current BUG is that target returns the doc just received from source.
Squashed commits from second shot on bug fixes, code cleanups, minor
additions to get sync working. One bug exists: Target returns the docs
just inserted as part of docs changed at target.

Added try-except to handle InvalidTransactionID in prepare_for_sync_exchange.

Removed unnecessary ZMQVerb and SyncType messages in get_sync_info and some code cleanup.

Removed code withing function get_docs_to_send and made it as inline code.

Changed return_list decorator to handle None type returns. Application now recovers from errors to serve further requests. But the client hangs in limbo. Recommend to add an ErrorMessage in protobuf.

Added target_gen and target_trans_id info in SendDocumentResponse message. Modified tests accordingly.

Fixed typo in utils.

Code cleanup + Bug hunting. Bug is still elusive.

Updated .gitignore