activePeers and routingTable out of sync

Add peer from activePeers to DHT routing table if not there to resync.

Refresh peers when receiving hello message

Changelog:
- When we receive a hello msg from a node then let's update the sidebar so we know we have new connected stores.

Fixed jslint issues.

I think this is some bullshit but ok :P

Transition to is not None

Reverse logic due to idiocy
Update missing peer logic

Before it was overwriting the activePeer with None if not found in the routing table so now there is a temporary routing_peer and if not found in the routing table it's added.
Fix bad logic
Merge pull request #714 from hoffmabc/feature-refresh-peers

Peer Management Updates
Put multisig tests in test folder.

* Format them as semi-unittests.
Merge pull request #763 from Renelvon/multisig_test

Put multisig tests in test folder.
Prerequisite changes in GUIDMixin and KBucket.

* Add and test hashing in GUIDMixin; a GUIDMixin can now be used
  as a key in a dictionary.
* Add and test iterator interface in KBucket.
* Drop default value for market_id and relevant test.
* Test KBucket.addContact upgrades basestrings to GUIDMixins.
* Follow python 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.
* Drop unused TimeoutError class.
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 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.
* Delegate logger instantiation to superclass.
Fix and abstract ID range. 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.
* Include a hint for a possible optimization.
* 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.
Test and refactor RoutingTable.distance.

* Raise ValueError if strings have unequal lengths.
* Handle guid.GUIDMixins transparently.
* Follow python naming conventions.
Test and refactor touchKBucket.

* Add ability to set timestamp manually.
* Test the abstract method, too.
Add and test numToId for easy conversions.

* Refactor _randomIDInBucketRange to use numToId.
* Abstract node ID length in constants.py
* Refactor distance to use node ID length, and raise
  an exception when either of the keys is of improper
  length.
Test and refactor getRefreshList.

* Be deterministic; do not use randomized IDs.
* Drop _randomIDInBucketRange as it is no longer used.
* Use a list comprehension for simplicity.
* Avoid invoking time.time() many times. :P
* Optimization: do not enter loop if force flag is set.
* Drop unused import.
Drop addContact from TreeRoutingTable.

* Its 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.