Fix bug caused by missing document

Fix bug that was causing the initLastSequence method to fail when the tracked
database does not have the document that holds the last saved sequence number.
Fix bug that always trigger distributable resource_data update.

This fix removes the '_id' from the distributableData when comparing it with
 the the existing distributable which does not have an '_id' key.
Remove extra blank space
Add option to set distribute resour_data url

-Add new option to set the distribute resource_data url.  This is the url
that another node couchdb would use for distribution/replication.  By
default it is set to <nodeURL>/resource_data.

-Clean up and refactor. Move the code that change the pylons
configuration file to its own method.
Update Distribute To Closer Match Spec

First pass at updating the distribute code to match the spec closer.  It is
not in full compliance because there are some required fields/data that are not
mentioned in the spec. 'filter_description' and 'resource_data_url' are additional
fields that a source node needs from the destination node complete
distribute/replication
Fix Logical and Syntax error Bugs

-Fix bug in setting connection that never got executed before.

-Fix the way gateway connection was derived, a connection is considered
a gateway connection if either the source or destination is a gateway node.
Before, the code was using an and (requiring both source and destination
to be gateway node to set the connection as gateway connection.)
Add some debugging info
Use new coucdb _replicator for replication

-Use the couchdb _replicator database for distribute/replication, we  will have replication completion time available.  Clean
up the distribute code and refactor it to return the replication/distribute results.

-Update the test_distribute.py code the use the replication/distribute returned results.
Add additional distribute test cases.

Still in progress, create new test cases for distribute that tests with large
networks (testing with nodes with more than on connections.)
Updated to pull stale flag from config, and use update_after
Create Directory for log files

Put distribute test nodes log files in log file directory.
Log replication result document
Updated to set couchdb.stale.flag based on the version string returned from couch
Fixed to work with newest description doc and with the old incorrect format
fixed content-type
Fixed test for content-type of 404 errors
Found some more places using stale=ok
Updated version checker to set correct value
Merge branch 'master' of github.com:LearningRegistry/LearningRegistry into staleUpdate
Add method to remove _replicator docs

Add method to remove replication/distribute test docs from the replicator database.