Abstract the Elliptic Curve used; setup initial testsuite.

* Introduce crypto_util.BTC_CURVE as the curve's name. Replace any
  magic strings in the codebase with crypto_util.BTC_CURVE.
* Invoke pyelliptic.OpenSSL to get curve ID
* Abstract the key length.
Abstract and test public and private key processing.

* pubkey_to_pyelliptic now returns key in bin format.
* Replace hexToPubkey with pubkey_to_pyelliptic.
Create and test a Cryptor class to abstract pyelliptic.

* Replace makePubCryptor, makePrivCryptor and ec.ECC with Cryptor.
* Provide the ECC key getters; do not keep the keys in Cryptor class.
* Purge pyelliptic imports outside crypto_util.
* Purge most references to _myself; replace the rest with cryptor.
Merge pull request #735 from Renelvon/refactor_crypto_util

Refactor and test crypto_util. Wrap pyelliptic.
Refactor network_util; use it in DHT.

* Test for private address using IPy.
* Abstract protocol in get_peer_url.
* Prefer importing modules than names.
* Drop unused imports.
* Other style fixes.
Refactor code in connection.py.

* Drop unused attributes _peer_alive and responses_received.
* Make failure cases stand out in send, send_raw and start_handshake.
* Drop PeerListener.stop.
  * Do not destroy global context arbitrarily.
  * Turn TransportLayer.shutdown into abstract method.
* Straighten PeerListener.listen.
* Make default callbacks equal to None.
* Catch ValueErrors produced by json.loads.
* Assert the sender's guid has been initialized prior to sending.
* Remove unused import.
Merge pull request #723 from Renelvon/connection_refactor

Refactor connection.py and network_util.py
Drop indirect dependencies.

* Drop backports.ssl-match-hostname and certifi; installed by tornado.
* Drop ecdsa, and zope.interface; installed by python-obelisk.
* Drop websocket.client; it is nowhere used.
* Drop wsgiref; it is a standard module.
Merge pull request #815 from Renelvon/less_reqs

Drop indirect dependencies.
Return from new peer handshake, save peer to db

Enable return from new peer handshake to add_peer() so peer info is
saved to persistent database.
Bugfix: .join() expects list argument
Merge pull request #827 from freamon/fix_return_from_handshake

Fix return from handshake
ask users for permission before upgrading all their homebrew packages
Merge remote-tracking branch 'upstream/develop' into develop