Use booleans properly.
Use new octal notation (PEP 3127).
Added test for dbstore.getOrCreate

Fixed syntax
Merge pull request #939 from carolinux/test_coverage_improvements

Added test for dbstore.getOrCreate
move custom loglevel setup to node/__init__.py

Signed-off-by: Thomas Stilwell <stilwellt@openlabs.co>
log output: initial move to DATADUMP

Signed-off-by: Thomas Stilwell <stilwellt@openlabs.co>
add custom logging level DEBUGV=9

Signed-off-by: Thomas Stilwell <stilwellt@openlabs.co>
log output: initial move to DEBUGV

Signed-off-by: Thomas Stilwell <stilwellt@openlabs.co>
Merge pull request #884 from Renelvon/modern

Use forward-compatible python (part 1).
Merge pull request #889 from benemorius/log-datadump

log output: add DEBUGV and begin cleanup
Delegate splitting to the KBucket.

* A KBucket should handle the details of its splitting. This
  will enable using different subclasses of KBucket with the
  RoutingTable. It is also necessary to write thread-safe code.
* Test kbucket.splitKBucket.
Add and test MemKBucket.

* Test MemKbucket initialization.
* Test MemKbucket against the superclass testsuite.
* Model replacement cache as a deque.
* Test cache-splitting.
* Test contact replacement from cache.
Protect access to KBucket attributes via an RLock.

* A Kbucket is now a thread-safe object.
Replace TreeRoutingTable by OptimizedTreeRoutingTable.

* Dump splitKBucket inside addContact.
* Some docstring fixes.
* Drop TreeRoutingTable from the testsuite.
* Test removing absent contact should not throw ValueError.
* Add reference to Kademlia paper.
Only return all contacts if count is negative.

* Fix a bug where OptimizedTreeRoutingTable.findCloseNodes would return
  more nodes than requested.
Test addContact.

* Tests ported from the drogulus project.
* Disallow adding self in the RoutingTable.
Test and minor refactor findCloseNodes.

* Tests ported from the drogulus project.
Various style fixes.

* Install pythonic names in kbucket and routingtable.
* Add module docstrings.
* Clarify a condition.
* Drop excessive logging.
* Rename some variable.