Clean up and follow code conventions
Merge pull request #690 from gasull/cleanup-ignat99-feat

Cleanup ignat99 feat
Add iterator interface to KBucket; minor refactor.

* Test iterator interface.
* Drop default value for market_id; drop relevant test.
* Follow naming conventions.
Documentation maintainance.

* Update docstrings and function signatures.
* Follow python naming conventions as much as possible.
* Be consistent in the argument names.
* Require all methods to accept GUIDMixin as ID.
* Move TimeoutError to top for readability.
Setup initial testsuite; refactor abstract methods.

* Make abstract methods raise NotImplementedError; test most of them.
* Add initialization tests for abstract class.
* Follow python naming conventions.
* Test TimeoutError.
Test and refactor RoutingTable.distance.

* Raise ValueError if strings have unequal lengths.
Test and refactor initialization of RoutingTable implementations.

* Initialize superclasses properly.
* Use `super` instead of naming the superclass explicitly.
* Defer testing of other methods for now.
* Follow python naming conventions.
Test and refactor logger instantiation.

* Delegate logger instantiation to superclass.
Test init attributes.

* Install an ad-hoc equality for KBuckets.
* Follow python naming convention.
Test and refactor kbucketIndex.

* Handle GUIDMixin transparently.
* Raise KeyError on key with bad range.
* Raise RuntimeError if kbucket invariant is violated.
* Follow python naming conventions.
Test and refactor getContact.

* Handle GUIDMixin transparently.
* Ignore the docstring mentioning ValueError and
  test for a None value on unsuccessful lookup, as
  is the case throughout the code.
* Align signature with kbucket.GetContact and simplify code.
* Follow python naming convention.
Test and refactor removeContact(s).

* Make argument names consistent with rest of tested code.
* Leverage exceptions to simplify code structure.
* Add logging on exception.
* Follow python naming convention.
Support GUIDMixins in RoutingTable.distance

* Expand tests.
* Follow python naming conventions.
Test and refactor touchKBucket.

* Add ability to set timestamp manually.
* Test the abstract method, too.
Drop addContact from TreeRoutingTable.

* It's proper implementation is contested.
* It references undefined names ("addErrback").
* The class itself is nowhere used in the code.
* It is very difficult to test, as it entails the network.
Add and test numToId for easy conversions.

* Refactor _randomIDInBucketRange to use numToId.
Refactor getRefreshList.

* Do not use randomized IDs.
* Use a list comprehension for simplicity.
* Avoid invoking time.time() many times. :P
Drop _randomIDInBucketRange as it is no longer used.