WIP: Improve pivoting in channel log
Enable SSL serving

Add "SSLCert" and "SSLKey" keys to the config file, whose values are
paths to PEM-format files containing an X.509 certificate and its
matching private key.
Fixes #176
Revert "WIP: Improve pivoting in channel log"

This reverts commit 68cb0a44a4bbafdbefefd67892a71602458eeb53.
Updated License's copyright date
Updating README to remove unnnecessary arguments

Default is 'walrus' as indicated in menu help, can remove and run SG as
is
Unnecessary for build/installers

Do not add Release notes to build, they are available online
Fix initial installation of users/roles from config file

Oops, this had been broken for a while.
Fixes #177
Update README.md
Coordinate changes to channel-logs

All appends to a channel-log funnel into a channelLogWriter object that
collects them and writes them at once. This will improve performance of
heavily-loaded single-node configurations.
Fixes #168
channelLogWriter now sorts changes by seq before appending them

Also introduced a 50ms pause between updates of a channel-log, so
more changes get batched together.
Updated go-couchbase. Fixed unit tests.
Oops, needed to update walrus again
Updated go.text/language package sources

This package's repo uses Mercurial, so we can't make it a submodule.
Copied in the contents of hg revision b1a7e9967ab3:

changeset:   41:b1a7e9967ab3
user:        Nigel Tao <nigeltao@golang.org>
date:        Fri Sep 27 18:12:46 2013 +1000
summary:     go.text/encoding: add Replacement and XUserDefined encodings.

Note: There is one newer revision (40d3e0c98d89) but it breaks
compatibility with Go 1.1 so I didn't update to it.
Make waiting change listener trigger only when relevant channels change
Added ability to import pre-existing docs in bucket

Adding the db config property "importDocs":true will scan the database
at startup for documents that aren't known to the gateway (i.e. docs
whose keys don't start with "_sync:" and don't have a "_sync" property)
and add them as though they were new documents. This will add a "_sync"
property, run the doc through the sync function, and assign channels
and user/role access as usual.
This should only be used on a single gateway node, otherwise all nodes
will simultaneously try to import documents and step on each other.
Import new unversioned docs as they're created

If db config "importDocs" is set to "continuous", the gateway will watch
for new docs created by other clients that don't have sync metadata, and
immediately add the metadata.
This only applies to new docs, not changes to existing ones.
Fixed nasty bug with change-log generation that caused duplicate entries

addChangeLog() -- which saves a new channel log if one doesn't already
exist -- was not running on the same goroutine as the channelLogWriter
that makes all other changes to that channel log. That meant it could
add the channel before the entries got written, and then the entries
would be appended to that channel as duplicates.
Change to support clients handling the "removed" changes-feed property

When a doc becomes inaccessible to a client, the client sees one last
_changes feed entry for the doc, with a "removed":true property. The
client will GET the revision as usual. The gateway shouldn't return an
error, even though the doc isn't accessible; instead, as with a deleted
doc, it should return a body with no contents except a "_removed"
property.
(The reason the client needs to get the revision, even though it knows
there isn't anything in it, is that it needs to see the history so it
can incorporate it into the revision tree locally. It wouldn't need to
if the _changes feed included this, but it doesn't. The only way to get
it is to GET the document itself.)
This is for issue couchbase/couchbase-lite-ios#29
Weird, one hunk was missing from the prior commits... (fixes build)
go-couchbase: Catch invalid/missing URLs in server config JSON

Updating go-couchbase submodule to pick up the following fix:

url.Parse() accepts garbage like "" or "foo bar" without returning an
error. The resulting URLs don't work and cause errors later on, when
it's hard to tell where they came from. I'm working around this by
checking the parsed URL object for a non-empty Scheme component.
Added a utility function ParseURL that does this.
(See issue couchbase/sync_gateway#147)